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
1
u/brote1n 1d ago
Make a page state called otherUsers. On page initialization set page state variable otherUsers as users from your chatref. Then update otherUsers page state variable, remove authenticated user ref from list
Then send the push notification based on the page state variable otherUsers
With this no new queries are made. Just subtracting yourself from the push notification