matrix-org / matrix-org/matrix-spec

Add API for getting the current notification counts.

Open
#215 1 comment 0 reactions 0 assignees View on GitHub
A-Client-Server enhancement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

As per https://github.com/matrix-org/synapse/pull/926 and https://matrix.to/#/!DdJkzRliezrwpNebLk:matrix.org/$14686556611517EDanG:kentshikama.com

> So as part of a larger project I'm working on creating a simple javascript extension that reads notifications. Code looks as follows: https://github.com/aoh0x7DE/diaspora/blob/0d2a4973398be1cb8387fba444f6503cd7a8e2b4/app/assets/javascripts/matrix.js . Unfortunately it needs to poll every second to feel real time. If we remove the filter to try to make it only return if there is an event, it does indeed return the count for the specific room but not others. The thing is, if there are no events in a room, the request will return no events for that room, meaning that there will also be no unread_notifications count for that room because that magically disappears if there are no events.

@KentShikama

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Synapse PR #926, the linked Matrix discussion, and app/assets/javascripts/matrix.js to understand the notification-count use case. Determine the API and specification changes needed to expose current counts without relying on room events or frequent polling; done means the behavior is defined in the Matrix specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.