Skip to content

Conversation

@kristina-fefelova
Copy link
Member

No description provided.

Signed-off-by: Kristina Fefelova <[email protected]>
@kristina-fefelova kristina-fefelova requested a review from Copilot May 23, 2025 16:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for link previews by adding new event types, validation schemas, database adapter methods, and corresponding migration scripts.

  • Added CreateLinkPreview and RemoveLinkPreview events and schemas.
  • Extended the database and SDK types to handle link preview data.
  • Updated query utilities and messaging logic to incorporate link preview information.

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/server/src/notification/notification.ts Updates the notifyReaction usage to align with the new event structure.
packages/server/src/middleware/validate.ts Adds new validations for CreateLinkPreview and RemoveLinkPreview events.
packages/server/src/middleware/db.ts Implements database methods for creating and removing link previews along with related changes.
packages/sdk-types/src/requestEvents/message.ts & responseEvents/message.ts Introduces new event interfaces and updates to support link preview data.
packages/cockroach/src/* Adds migration scripts, schema changes, and adapter updates to support link previews.
packages/query/* Updates queries and mapping functions to include link preview information.
packages/rest-client/* Integrates link preview changes into REST client functions.
Comments suppressed due to low confidence (2)

packages/server/src/middleware/validate.ts:164

  • Please ensure that unit tests are added to cover the new CreateLinkPreview and RemoveLinkPreview events to validate their behavior and schema compliance.
case MessageRequestEventType.CreateLinkPreview:

packages/server/src/notification/notification.ts:52

  • Ensure that using 'event.message' instead of 'event.reaction.message' in the notifyReaction call is intentional and consistent with the expected API behavior.
return await notifyReaction(ctx, event.card, event.message, event.messageCreated, event.reaction)

Signed-off-by: Kristina Fefelova <[email protected]>
@kristina-fefelova kristina-fefelova merged commit 25aa03f into main May 23, 2025
1 check passed
@kristina-fefelova kristina-fefelova deleted the link-preview branch May 23, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants