message_list_view: Replace util.same_sender with sender_id check.

This commit is contained in:
evykassirer
2024-09-04 12:11:32 -07:00
committed by Tim Abbott
parent b387ad24fa
commit 71d01291b6
2 changed files with 1 additions and 12 deletions

View File

@@ -55,7 +55,7 @@ function same_sender(a, b) {
if (a === undefined || b === undefined) {
return false;
}
return util.same_sender(a.msg, b.msg);
return a.msg.sender_id === b.msg.sender_id;
}
function same_recipient(a, b) {

View File

@@ -93,17 +93,6 @@ export const same_recipient = function util_same_recipient(a?: Recipient, b?: Re
return false;
};
export const same_sender = function util_same_sender(
a: RawMessage | undefined,
b: RawMessage | undefined,
): boolean {
return (
a !== undefined &&
b !== undefined &&
a.sender_email.toLowerCase() === b.sender_email.toLowerCase()
);
};
export function normalize_recipients(recipients: string): string {
// Converts a string listing emails of message recipients
// into a canonical formatting: emails sorted ASCIIbetically