mirror of
https://github.com/zulip/zulip.git
synced 2025-10-25 09:03:57 +00:00
message_view: Live update on losing access to a stream.
This commit adds code to live update the message view when user loses access to a stream and also remove the data of messages from that stream.
This commit is contained in:
@@ -348,3 +348,9 @@ export function remove(message_ids: number[]): void {
|
||||
stored_messages.delete(message_id);
|
||||
}
|
||||
}
|
||||
|
||||
export function get_message_ids_in_stream(stream_id: number): number[] {
|
||||
return [...stored_messages.values()]
|
||||
.filter((message) => message.type === "stream" && message.stream_id === stream_id)
|
||||
.map((message) => message.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user