Skip to content

Conversation

@nickvergessen
Copy link
Member

Tested on prod for myself after seeing that I had 73 notifications in the database but only 2 displayed in the UI.

The problem is Talk and some others don't have an icon/link stored in the database (as they might change), instead they are added on rendering, e.g. here:
https://github.com/nextcloud/spreed/blob/eb45b2eb8787207d072e5399da50f24f000df658/lib/Notification/Notifier.php#L242-L244

However Talk does this generally up front, so when it later on says "alright, the chat was read already, lets mark the notification as processed":
https://github.com/nextcloud/spreed/blob/eb45b2eb8787207d072e5399da50f24f000df658/lib/Notification/Notifier.php#L487-L498
the data is already manipulated.

Notifications app is then asked to delete the notification, but it adds the non-empty link and icon to the query, they are empty in the DB => No match => No delete

I think it's save to assume that link and icon are never used as "uniqueness" factor and therefore we can ignore them on deletion.

@github-actions
Copy link
Contributor

🐢 Performance warning.
It looks like the query count of the integration tests increased with this PR.
Database query count is now 8549 was 8200 (+4.25%)
Please check your code again. If you added a new test this can be expected and the base value in tests/Integration/base-query-count.txt can be increased.

@nickvergessen nickvergessen merged commit ede7be8 into master Mar 21, 2024
@nickvergessen nickvergessen deleted the bugfix/noid/ignore-icon-and-link-on-deletion branch March 21, 2024 16:52
@nickvergessen
Copy link
Member Author

/backport to stable28

@nickvergessen
Copy link
Member Author

/backport to stable27

@nickvergessen
Copy link
Member Author

/backport to stable26

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants