mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Add and use util.is_current_user helper function.
Previously, we were checking if a particular user was the current user in dozens of places in the codebase, and correct case-insensitive checks were not used consistently, leading to bugs like #502.
This commit is contained in:
		@@ -42,7 +42,7 @@ exports.process_message = function (message) {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.notifies = function (message) {
 | 
			
		||||
    return ((message.sender_email !== page_params.email) && message.alerted);
 | 
			
		||||
    return !util.is_current_user(message.sender_email) && message.alerted;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
return exports;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user