mirror of https://github.com/zulip/zulip.git
aeb9a27d0e
Zulip's unread messages design has an invariant that all unread stream messages must be in streams the user is subscribed to. For example, We do not include the unread messages from unsubscribed streams in the "unread_msgs" data structure in "/register" response and we mark all unread messages as read when unsubscribing a user from a stream. Previously, the mark as unread endpoint allowed violating that invariant, allowing you to mark messages in any stream as unread. Doing so caused the "message_details" data structures sent with "update_message_flags" events to not contain messages from unsubscribed streams, even though those messages were present in the set of message IDs. These malformed events, in turn, caused exceptions in the frontend's processing of such an event. This change is paired with a separate UI change to not offer the "Mark as unread" feature in such streams; with just this commit, that will silently fail. With some additions to the tests by tabbott. |
||
---|---|---|
.. | ||
actions | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
openapi | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |