Skip to content

feat: store structured reaction data (reaction_to_id, reaction_emoji)#67

Open
vlassance wants to merge 1 commit intosteipete:mainfrom
vlassance:feat/structured-reaction-storage
Open

feat: store structured reaction data (reaction_to_id, reaction_emoji)#67
vlassance wants to merge 1 commit intosteipete:mainfrom
vlassance:feat/structured-reaction-storage

Conversation

@vlassance
Copy link
Copy Markdown

Summary

  • Add reaction_to_id and reaction_emoji columns to the messages table via migration v4
  • Pass structured reaction data through UpsertMessageParams and into the database
  • Complements the display_text approach from PR Add display text for reactions, replies, media types #5 with machine-readable reaction data

Problem

PR #5 added display_text for reactions (e.g., "Reacted 👍 to hello"), which is great for human-readable output. However, there is no way to programmatically query which message a reaction targets or what emoji was used. This makes it difficult to build downstream tools that need to process reactions (e.g., counting reactions, filtering by emoji).

Solution

Store the raw reaction_to_id (stanza ID of the message being reacted to) and reaction_emoji (the emoji text) as separate columns. These are populated from the existing ParsedMessage.ReactionToID and ParsedMessage.ReactionEmoji fields that are already parsed by the wa package.

Testing

  • go test ./... — all tests pass
  • go build ./... — builds cleanly

Add reaction_to_id and reaction_emoji columns to the messages table
via migration v4. This stores structured reaction metadata alongside
the existing display_text approach, enabling programmatic access to
reaction data (e.g., which message was reacted to, and with what emoji).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steipete steipete requested a review from dinakars777 as a code owner April 21, 2026 03:54
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.

1 participant