I have a function in my app to show a notification when current user receive a new message (messaging in the app) By doing a search for messages that contain current user and where the creator of the message is not the current user
I gave this group data type so I can do the search
When there is a message not seen by current user this will be visible
it was working fine but now it only work for just two specific users and it doesn’t work for new users. I can’t figured it out
The problem is likely with your “last-viewed-by-user”, have you made sure it is saving the date properly under all circumstances?
For example, if you have a normal chat feed, you might be saving this date when a user clicks on one of those chats and goes into it, but if users are receiving messages before they have left the chat, (meaning the last viewed time might be 10:00, and a new message came in at 10:01, but the user didn’t “leave the chat” until 10:02. So the notification is clocking the last view time was 10:00, but in reality it was last viewed at 10:02
Also if you have multiple ways for a user to go into a chat (from a chat feed, from the notifications or from email notifications) make sure all of them are saving the “last viewed by user” date properly
If none of these work, you can book a session here and we can get it sorted
Cheers,
Bodie Bloore
1 Like
Hi Bodie Bloore, my name is Mehdi, thank you so much for replying, I exhausted all my efforts with no luck, I did schedule a meeting with you just now at 2pm pacific time today Sunday Dec 3rd. I look forward to it! Again thank you so much!!