Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_flags: Add an assertion check for stream.recipient_id.

Zixuan James Lid3f976a0a33f
diff --git a/zerver/views/message_flags.py b/zerver/views/message_flags.py
index ebb76b222b6..931f16b1041 100644
--- a/zerver/views/message_flags.py
+++ b/zerver/views/message_flags.py
@@ -64,6 +64,7 @@ def mark_stream_as_read(
request: HttpRequest, user_profile: UserProfile, stream_id: int = REQ(json_validator=check_int)
) -> HttpResponse:
stream, sub = access_stream_by_id(user_profile, stream_id)
+ assert stream.recipient_id is not None
count = do_mark_stream_messages_as_read(user_profile, stream.recipient_id)
log_data_str = f"[{count} updated]"