Feat/add sticker support clean - #157
Conversation
|
@anshika-guleria is attempting to deploy a commit to the Akash Santra 's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Please check @Akash504-ai |
Akash504-ai
left a comment
There was a problem hiding this comment.
The screenshots seem to show the existing emoji feature. Since this issue is for stickers, could you share a screenshot of the new sticker picker and a sticker message being sent? Just want to verify the sticker part before reviewing.
|
O sorry i sent the wrong ones give me a minute |
|
sorry you were right i also had forgotten to push the svg files sorry about that i have updated images |
There was a problem hiding this comment.
Why is the OTP/auth logic being changed in this PR? These changes don't seem related to #119. Please revert the unrelated auth changes so this PR stays scoped to sticker support.
There was a problem hiding this comment.
Should we validate stickerUrl against the available sticker packs before saving/sending it? Right now it looks like an arbitrary URL could be stored as a favorite/recent sticker.
|
I have updated sticker.controller.js on the backend to validate stickerUrl against the set of valid sticker URLs from the registered sticker packs before saving it to favorites |
|
Does it require more tweaks @Akash504-ai |
Summary
Implemented native sticker pack support for PasoChat, allowing users to send and receive expressive, categorized stickers in both direct and group conversations.
Key Changes
1. Backend Architecture & Database Sync
Added
stickerfield to the message schema.Added
favoriteStickersandrecentStickersarrays to the user model.Added sticker APIs:
GET /api/stickers/packsGET /api/stickers/user-dataPOST /api/stickers/favorites/togglePOST /api/stickers/recentsUpdated
sendMessage,sendGroupMessage, andforwardMessageto support sticker messages.Added support for reply previews when working with sticker messages.
Recent stickers are deduplicated and limited to 30 items.
2. Built-in Sticker Packs
Added 46 SVG stickers across 5 curated packs in
frontend/public/stickers/:3. Interactive Sticker Picker
Created
StickerPicker.jsxwith:4. Message Composer & Chat Bubble
Integrated a dedicated Sticker button into
MessageInput.jsx.Added a separate sticker picker popup with outside-click dismissal.
Updated
MessageBubble.jsxto render sticker-only messages with:Screenshot
Testing
Closes Issue
Closes #119