Skip to content

fix(slack): enrich link previews with unfurl metadata from attachments#395

Merged
dancer merged 4 commits into
mainfrom
josh/slack-link-unfurls
Apr 30, 2026
Merged

fix(slack): enrich link previews with unfurl metadata from attachments#395
dancer merged 4 commits into
mainfrom
josh/slack-link-unfurls

Conversation

@dancer
Copy link
Copy Markdown
Collaborator

@dancer dancer commented Apr 17, 2026

summary

  • add attachments field to SlackEvent interface for legacy unfurl data
  • enrich LinkPreview objects with title, description, imageUrl, and siteName from Slack's attachment metadata
  • selectively handle message_changed events for unfurl updates instead of blanket-ignoring them
  • links fetched via conversations.replies / conversations.history now include full OG metadata for toAiMessages

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat Ready Ready Preview, Comment, Open in v0 Apr 30, 2026 8:14pm
chat-sdk-nextjs-chat Ready Ready Preview, Comment, Open in v0 Apr 30, 2026 8:14pm

Comment thread packages/adapter-slack/src/index.ts
Comment thread examples/telegram-chat/src/index.ts Fixed
@dancer dancer removed request for a team and cramforce April 30, 2026 20:11
@dancer dancer force-pushed the josh/slack-link-unfurls branch from b04950e to 0d8489b Compare April 30, 2026 20:13
@dancer dancer merged commit ded6f78 into main Apr 30, 2026
12 checks passed
@dancer dancer deleted the josh/slack-link-unfurls branch April 30, 2026 20:19
patrick-chinchill pushed a commit to Chinchill-AI/chat-sdk-python that referenced this pull request May 15, 2026
Bundles 5 small upstream bug fixes into one PR. Each is independent and
covered by a regression test.

- vercel/chat#394 (slack): preserve email addresses in @mention regex.
  ``user@domain.com`` no longer extracts ``@domain`` as a mention.
- vercel/chat#292 (slack): guard Slack API calls against empty
  ``thread_ts`` to fix ``invalid_thread_ts`` errors.
- vercel/chat#256 (discord): remove duplicate text when posting card
  messages. ``content`` is omitted on the create path and explicitly
  cleared on the edit path (Discord PATCH preserves omitted fields).
- vercel/chat#395 (slack): enrich link previews with unfurl metadata
  from attachments. Routes ``message_changed`` events through a new
  ``_handle_message_changed`` so the message handler sees unfurled
  links instead of bare URLs. New cache + poll window.
- vercel/chat#407 (telegram): rewrite format converter to emit
  MarkdownV2 (``*bold*`` etc.) instead of legacy ``Markdown``. Adds
  proper escaping for the 18 special characters MarkdownV2 reserves
  in normal text, the narrower set inside code blocks, and the
  parens/backslash escape inside link URLs.

https://claude.ai/code/session_01FyMxQn2BEAzmwKS1GZczKj
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.

3 participants