'How to get the number of unread messages for user from synapse server via API

How can the number of unread messages (or events) for a specific user be retrieved from a matrix synapse server via API? Via the synapse admin or the matrix client-server API.

Events seem to be a complex topic.

Thanks a lot!



Solution 1:[1]

Two solutions:

  1. https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3notifications returns only unread notifications
  2. https://spec.matrix.org/v1.1/client-server-api/#get_matrixclientv3sync returns the number of unread notifications for each room the user is a member: "org.matrix.msc2654.unread_count": 0

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Paul