Skip to content

Allow to receive messages without marking notifications as unread#9066

Merged
nickvergessen merged 1 commit intomasterfrom
feature/noid/mark-notifications-as-read-in-receive-messages
Mar 16, 2023
Merged

Allow to receive messages without marking notifications as unread#9066
nickvergessen merged 1 commit intomasterfrom
feature/noid/mark-notifications-as-read-in-receive-messages

Conversation

@SystemKeeper
Copy link
Contributor

Currently when retrieving new messages, notifications of the spreed app are marked as read by default:

if ($user instanceof IUser) {
$this->notifier->markMentionNotificationsRead($chat, $user->getUID());
}

This is usually fine, but when we want to retrieve messages in the background on the mobile clients (to have the messages ready when we open the app again).
This PR adds a new parameter markNotificationsAsRead which allows to explicitly state that we do not want to mark notifications as read when retrieving messages.

🏁 Checklist

@SystemKeeper SystemKeeper changed the title Feature/noid/mark notifications as read in receive messages Allow to receive messages without marking notifications as unread Mar 15, 2023
@SystemKeeper SystemKeeper added 3. to review enhancement feature: chat 💬 Chat and system messages feature: api 🛠️ OCS API for conversations, chats and participants labels Mar 15, 2023
@SystemKeeper SystemKeeper force-pushed the feature/noid/mark-notifications-as-read-in-receive-messages branch from 5153392 to 2d7ef86 Compare March 16, 2023 11:42
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper SystemKeeper force-pushed the feature/noid/mark-notifications-as-read-in-receive-messages branch from 2d7ef86 to d480f3a Compare March 16, 2023 11:44
@SystemKeeper
Copy link
Contributor Author

Both comments addressed, rebased and squashed

@nickvergessen nickvergessen enabled auto-merge March 16, 2023 14:13
@SystemKeeper
Copy link
Contributor Author

Test failure seems unrelated?!

@nickvergessen nickvergessen merged commit 98847dd into master Mar 16, 2023
@nickvergessen nickvergessen deleted the feature/noid/mark-notifications-as-read-in-receive-messages branch March 16, 2023 23:10
@SystemKeeper
Copy link
Contributor Author

/backport to stable26

| `setReadMarker` | int | `1` to automatically set the read timer after fetching the messages, use `0` when your client calls `Mark chat as read` manually. (Default: `1`) |
| `includeLastKnown` | int | `1` to include the last known message as well (Default: `0`) |
| `noStatusUpdate` | int | Whether the "online" user status of the current user should be "kept-alive" (`1`) or not (`0`) (defaults to `0`) |
| `markNotificationsAsRead` | int | `0` to not mark notifications as read (Default: `1`, only available with `chat-read-status` capability) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be chat-keep-notifications ?

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

Labels

enhancement feature: api 🛠️ OCS API for conversations, chats and participants feature: chat 💬 Chat and system messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants