Fix Addie not seeing forwarded Slack messages#495
Merged
Conversation
When users forward messages in Slack (via channel @mention or DM), the forwarded content is in the `attachments` array, not the `text` field. This caused Addie to miss the forwarded content entirely. Changes: - Add `extractForwardedContent()` helper to extract text from attachments - Apply extraction in `handleAppMention` for channel @mentions - Apply extraction in `handleDirectMessage` for DMs - Update type guard in `handleChannelMessage` to allow DMs with attachments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reaction confirmations: When users react to Addie's messages with thumbs up/check, treat as "yes, proceed". Thumbs down/X means no. Non-confirmation reactions are recorded as feedback. - File share awareness: Extract file metadata (name, type, size, link) from file_share messages so Addie knows what files were shared. - URL extraction: Helper function to extract URLs from Slack messages for future link-following capability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New tools for Addie: - fetch_url: Fetch and read content from web URLs shared in messages - Extracts text from HTML - Supports text/html/markdown extraction modes - Handles timeouts and size limits - Blocks localhost and local IPs - read_slack_file: Download and read files shared in Slack - Uses bot token for authentication - Supports text-based files (txt, md, json, code files, etc.) - Gracefully handles PDFs and images (acknowledges but can't read) - Enforces size limits 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve Addie's understanding of Slack messages beyond plain text:
attachmentsarray when users forward messagesfetch_urltool reads web content from URLs shared in messagesread_slack_filetool downloads and reads text files from SlackChanges
extractForwardedContent()to pull text from forwarded message attachmentsextractFileInfo()to extract metadata from shared filesextractUrls()helper for URL detection in messageshandleReactionAdded()event handler for emoji reactions on Addie's messagesPOSITIVE_REACTIONSandNEGATIVE_REACTIONSsets for confirmation detectionhandleDirectMessageandhandleAppMentionto use new extractorshandleChannelMessageto allow file-only messagesserver/src/addie/mcp/url-tools.tswith URL/file fetching toolsTest plan
read_slack_file🤖 Generated with Claude Code