mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
buddy_data: Check conversation_participants against legacy data.
We expect to remove this check once we've confirmed the logic is correct.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import _ from "lodash";
|
||||
import assert from "minimalistic-assert";
|
||||
|
||||
import * as blueslip from "./blueslip.ts";
|
||||
import {ConversationParticipants} from "./conversation_participants.ts";
|
||||
import * as hash_util from "./hash_util.ts";
|
||||
import {$t} from "./i18n.ts";
|
||||
import * as message_lists from "./message_lists.ts";
|
||||
@@ -464,6 +467,15 @@ export function get_conversation_participants(): Set<number> {
|
||||
participant_ids_set.add(message.sender_id);
|
||||
}
|
||||
}
|
||||
const conversation_participants = new ConversationParticipants(
|
||||
message_lists.current.all_messages(),
|
||||
).visible();
|
||||
if (!_.isEqual(participant_ids_set, conversation_participants)) {
|
||||
blueslip.error("Participants calculations disagree", {
|
||||
participant_ids_set,
|
||||
conversation_participants,
|
||||
});
|
||||
}
|
||||
return participant_ids_set;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user