spreed
spreed copied to clipboard
Notifications not removed from database after joining
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- UserA sends message to UserB
- Confirm notification is in DB
- UserB joins the conversation -> message is marked read
Expected behaviour
The notification for the message send by UserA to UserB should be removed from the database
Actual behaviour
The notification is still in the database. I also assume that the "send silent push to indicate that the notification was removed" is also not triggered.
It does work though, if the page is reloaded and then the conversation is joined.
https://github.com/nextcloud/spreed/assets/1580193/f2fa95bd-ec1b-48d4-aaee-695b1450b85f
Talk app
Talk app version: main
Browser
Operating system: MacOS 14.1.2
Browser name: Chrome
Browser version: 119
We tried to improve this with https://github.com/nextcloud/spreed/pull/10889
https://github.com/nextcloud/spreed/blame/f2f5e4b393327592f8f8047b8123c3e0e0971748/lib/Notification/Listener.php#L137-L140
Is it reactions you are seeing (like me) or any notifications?
Is it reactions you are seeing (like me) or any notifications?
The test above was with a normal chat message
I think it's due to the change in https://github.com/nextcloud/spreed/pull/10544, where we set markNotificationsAsRead
always to 0
:
https://github.com/nextcloud/spreed/blob/06af15480324de78c7f4e5365e2164a9921794b6/src/services/messagesService.js#L72-L72
To improve the situation I think it makes sense to set the parameter depending on the session state? So 1
in case the session is active?
Well that is up to 30 seconds delayed due to long running requests atm.
But still would remove existing notifications for that conversation as soon as we receive a message ?
But not when the user is no longer looking at it
But not when the user is no longer looking at it
Right... So should we add a parameter to the mark as read endpoint so the web could remove notifications when doing mark as read when the session is active?