Skip to content

Conversation

redstrate
Copy link
Contributor

This fixes a bug in the following case:

  • The user has disabled notifications for messages in their push rules.
  • There is no room-specific override for notifications in the push rules.

In libQuotient applications - despite being asked to not to - will still add new unread messages to the notable count. This does not happen in other clients, e.g. Element. So now the notable count is used from the server which is correct as it takes into account the push configured by the user.

This fixes a bug in the following case:
* The user has disabled notifications for messages in their push rules.
* There is no room-specific override for notifications in the push
rules.

In libQuotient applications - despite being asked to not to - will still
add new unread messages to the notable count. This does not happen in
other clients, e.g. Element. So now the notable count is used from the
server which is correct as it takes into account the push
configured by the user.
@redstrate
Copy link
Contributor Author

hmm, I think this causes some asserts to trip still :D

@KitsuneRal KitsuneRal self-requested a review February 22, 2025 12:27
@KitsuneRal KitsuneRal added the bug/fix The library doesn't work as expected label Feb 22, 2025
@KitsuneRal
Copy link
Member

The problem this tries to fix is, basically, lack of proper push rules support in libQuotient. The notification stuff in libQuotient is almost non-existent - notifying or not notifying is effectively the application's concern right now. As it stands now, notableCount is a cludge to support notification count in at least some way, hardcoding the logic in Room::isEventNotable(). So if you want to suppress message counters you might look into hacking this function instead - that is, if you're not into implementing proper push rules support in the library, somewhere around Room::checkForNotification().

And there's one more reason using server-side notification counts is ineffective - it just doesn't work in an expected way in encrypted rooms. So the overall direction for the library should be, I think, to maintain those counters entirely client-side. But I'm happy to stand corrected.

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

Labels

bug/fix The library doesn't work as expected

Projects

Status: In work

Development

Successfully merging this pull request may close these issues.

2 participants