zulip-terminal icon indicating copy to clipboard operation
zulip-terminal copied to clipboard

Support mark-all-as-read events

Open neiljp opened this issue 4 years ago • 6 comments

This is not something I run into often, but I just marked a topic as read in the webapp, and nothing occurred in ZT. I assume this is since we ignore the 'all' part in the 'update_message_flags' event handler.

The format of the event needs to be determined for these kinds of events - do they still send all message ids, or is 'all' a substitute for that? How is the 'all' specified, in terms of what set it applies to, if not?

neiljp avatar May 04 '20 16:05 neiljp

+1 This could possibly be contributing to #642 too, along with our lack of read event handling for muted topics (#574)?

kaustubh-nair avatar May 04 '20 16:05 kaustubh-nair

This should only fail to reduce the counts in ZT (ie. not reduce them too far, ie. negative), since this is for read-flag event handling, and - at least currently in Zulip - messages cannot be marked as un-read.

neiljp avatar May 04 '20 17:05 neiljp

@neiljp The event does not send any message ids, but only specifies all: True in the response. This can be done by just setting all urnead counts to zero and marking stored messages as read?

For marking all messages of a stream as read, it returns a list of messages, but it will require #535 to be merged first, since all unread data is not present.

kaustubh-nair avatar Jun 29 '20 13:06 kaustubh-nair

Once this is resolved we should follow-up with UI to enable this action for streams and topics.

neiljp avatar Apr 05 '21 18:04 neiljp

I can work on this once I get @kaustubh-nair #535 ready for merging. I'll rebase the open PR and make changes necessary.

mkp6781 avatar Apr 05 '21 18:04 mkp6781

I've not had a change to look at this and related PRs recently, but Kaustubh's #535 was taken forward by mkp6781 into #997, which may be a blocker to enable this feature to be implemented correctly.

neiljp avatar Sep 17 '22 00:09 neiljp