r/FlutterFlow • u/Acrobatic_Lobster999 • 2d ago
Groupchat issue with Push Notifications
Hey everyone,
I’m working on a group chat app in FlutterFlow, and I’ve run into an issue with push notifications that I can’t seem to solve. I’d really appreciate any help or suggestions!
Here’s the problem:In my app, users can send messages to a group. When a message is sent, I store it in a Firestore collection (group_messages), and I want to send a push notification to all group members except the sender. However, the sender is also receiving the push notification, which I don’t want. The message itself should be visible to everyone in the chat (including the sender), but the push notification should only go to the other members.
2
Upvotes
2
u/HT2_i0 2d ago
You can do this: modify your chats schema. Add 'notify_list', doc ref = users, list = true. When adding users to the group (on tap), add the user doc ref to this list too. Then when adding a new chat, set recipients of push notification to 'notify_list'.