gotify / gotify/server

Synchronize notification state among clients

Open
#266 7 comments 9 reactions 0 assignees View on GitHub
a:feature
Dominant language
Go
Stars
15.9k
Forks
873
Avg merge
2d 22h
Merged PRs (30d)
6

Description

Currently, notifications that are read on one client are not automatically read on other clients. This means, when working on a PC and reading the notifications, the mobile phone would end up showing a collection of messages that have already been read.

A change was proposed in #171 to introduce a new `type` property to messages and let clients subscribe to new messages only. Although this would probably work, it's a bit hacky in my view.

I propose that we introduce a new API, that supports different events. To make Gotify backwards compatible with "old" clients, the current `/stream` endpoint will be enhanced by a GET parameter that specifies an API version, like `/stream?version=1`. The default API (if no version is specified), for now version 1, will support the current messages only. The clients will receive the same message format as right now, so that "old" clients do not break.

The new notification system is then reachable under `/stream?version=2`, and will push the types `new_message` and `read_message`.

This gives us more flexibility for future changes. If breaking changes occur, we can decide if older versions are still worth supporting, and drop support for versions we no longer see value in supporting.

I'd like to implement this in the following days, so please tell me if these changes are acceptable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.