Skip to content

feat: Add DM reaction support#63

Open
claudespiral wants to merge 1 commit intoQuilibriumNetwork:masterfrom
claudespiral:feature/dm-reactions
Open

feat: Add DM reaction support#63
claudespiral wants to merge 1 commit intoQuilibriumNetwork:masterfrom
claudespiral:feature/dm-reactions

Conversation

@claudespiral
Copy link

Summary

Add handling for reaction, remove-reaction, and remove-message content types in DM message processing.

Problem

Direct message reactions are sent correctly but not displayed on the receiving end. The Space message handler has reaction processing, but the DM handler saves all messages directly without checking content type.

Solution

Mirror the existing Space message handling pattern for DMs:

  • Check content.type after decrypting DM messages
  • For reactions: look up target message, update its reactions array, persist
  • For remove-reaction: remove the reaction from the target message
  • For remove-message: delete the message from cache and storage

Updates both React Query cache (immediate UI) and storage (persistence).

Changes

  • context/WebSocketContext.tsx: +136 lines of reaction handling logic

Testing

  1. Send DM from mobile app
  2. React to it from desktop or another client
  3. Verify reaction badge appears on mobile
  4. Test remove-reaction and remove-message

Notes

  • Pattern matches existing Space reaction handling exactly
  • No new dependencies

Add handling for reaction, remove-reaction, and remove-message content
types in DM message processing. This mirrors the existing Space message
handling to enable:

- Displaying reaction badges on DM messages
- Removing reactions from DM messages
- Deleting DM messages via remove-message

The code updates both React Query cache for immediate UI updates and
persists changes to storage.

Fixes missing DM reaction display functionality.
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