events: Add functionality to mark messages as unread.

Co-authored-by: Steve Howell <showell@zulip.com>
Co-authored-by: Tim Abbott <tabbott@zulip.com>

This commit adds the backend functionality to
mark messages as unread through update_message_flags
with `unread` flag and `remove` operation.

We also manage incoming events in the webapp.

Tweaked by tabbott to simplify the implementation and add an API
feature level update to the documentation.

This commit was originally drafted by showell, and showell
also finalized the changes.  Many thanks to Suyash here for
the main work here, which was to get all the tests and
documentation work moving forward.
This commit is contained in:
Suyash Vardhan Mathur
2021-06-09 11:31:39 +00:00
committed by Tim Abbott
parent bf890cf91a
commit 20a97bdb05
16 changed files with 993 additions and 15 deletions

View File

@@ -450,7 +450,7 @@ export function process_loaded_messages(messages) {
}
}
function process_unread_message(message) {
export function process_unread_message(message) {
// The `message` here just needs to require certain fields. For example,
// the "message" may actually be constructed from a Zulip event that doesn't
// include fields like "content". The caller must verify that the message