Skip to content

Conversation

@Asmi768
Copy link

@Asmi768 Asmi768 commented Sep 6, 2025

PR Description

What:
Adds message reactions (emoji + counts) to messages, with real-time updates via Socket.IO.

Why:
Reactions are a common UX pattern and increase engagement; small server changes and a lightweight frontend component add a lot of value.

Changes:

backend/models/Message.js — add reactions subdocument (emoji, count, optional users).

backend/routes/reactions.js — new endpoint POST /api/reactions/toggle.

frontend/src/components/MessageReactions.jsx — React component with optimistic updates + socket subscription.

Optional migration script and Jest test included.

Fixed file casing for model: Message.js → consistent with imports.

How to test:

Start backend + frontend.

Open two browser windows and join same conversation.

Click emoji on a message — reactions should update in both windows in real-time.

#open source connect india'25 contributor

@vercel
Copy link

vercel bot commented Sep 6, 2025

@Asmi768 is attempting to deploy a commit to the devayanm's projects Team on Vercel.

A member of the Team first needs to authorize it.

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