mirror of https://github.com/zulip/zulip.git
unread: Avoid use of opaque message.
We only care about ~8 fields from a Zulip message when we're tracking unread counts. For example, we don't care about the "content" field. This also sets us up to pull up the "display_recipient" logic in an upcoming commit.
This commit is contained in:
parent
80edf7456c
commit
f7e5847b5c
|
@ -426,7 +426,16 @@ export function update_unread_topics(msg, event) {
|
||||||
export function process_loaded_messages(messages) {
|
export function process_loaded_messages(messages) {
|
||||||
for (const message of messages) {
|
for (const message of messages) {
|
||||||
if (message.unread) {
|
if (message.unread) {
|
||||||
process_unread_message(message);
|
process_unread_message({
|
||||||
|
display_recipient: message.display_recipient,
|
||||||
|
id: message.id,
|
||||||
|
mentioned: message.mentioned,
|
||||||
|
mentioned_me_directly: message.mentioned_me_directly,
|
||||||
|
stream_id: message.stream_id,
|
||||||
|
topic: message.topic,
|
||||||
|
type: message.type,
|
||||||
|
unread: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue