Skip to content

Conversation

@sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Jan 27, 2026

https://wearezeta.atlassian.net/browse/WPB-22701

https://wearezeta.atlassian.net/browse/WPB-22701

What's new in this PR?

Issues

Application was not showing all notification when receiving a lot of messages.

Causes (Optional)

  1. Messages for notifications are queried from the Messages table based on the message timestamp and conversation last_notified_date. Last notified date was not updated correctly and some messages were filtered out by query.

  2. Notification updates are based on the activeNotifications property of NotificationManager. New notifications for same conversation are combined with already shown notifications. When multiple notifications are shown very fast activeNotifications property does not always have up-to-date list of notifications. This is causing incorrect updates based on out-of-date list.

Solutions

  1. Get the timestamp of the last notified message and use it as last_notified_date for conversation.
  2. Add small delay after adding/updating notification to let the NotificationManager update activeNotifications.

@sonarqubecloud
Copy link


// This delay is required to let notification manager update activeNotifications list
delay(NOTIFICATION_UPDATE_DELAY)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this delay needed now since we update the ID with the correct one from the last notified ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it here for two reasons:

  • There will be less questions from QA. Without this delay you can still reproduce the issue by sending messages fast.
  • It will not hide potential message delivery issues. If we see that there is a notification missing for some message we know it is not the NotificationManager issue. Something else is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants