mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	message_list_view: Replace util.same_sender with sender_id check.
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user