mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	Use stream_id in recipient comparisons.
Using stream_id in recipient comparisons fixes a bug in this scenario: go to home view, send message to stream, wait for admin to rename stream, send another message to the stream. Before this change, the stream name would live-update but you'd get a spurious recipient bar due to the prior message still having the old stream name in places internally. There were other ways to fix the live-update glitch, but it's just generally cleaner to do stream id comparisons. Part of this change is to add stream_id to compose_fade.set_focused_recipient().
This commit is contained in:
		@@ -58,7 +58,7 @@ exports.lower_bound = function (array, arg1, arg2, arg3, arg4) {
 | 
			
		||||
 | 
			
		||||
exports.same_stream_and_topic = function util_same_stream_and_topic(a, b) {
 | 
			
		||||
    // Streams and topics are case-insensitive.
 | 
			
		||||
    return ((a.stream.toLowerCase() === b.stream.toLowerCase()) &&
 | 
			
		||||
    return ((a.stream_id === b.stream_id) &&
 | 
			
		||||
            (a.subject.toLowerCase() === b.subject.toLowerCase()));
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user