mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	recent_topics: Use get_sub_by_id in format_topic to get stream info.
We can use get_sub_by_id instead of get_sub to get the stream info, as we already have stream id from the message object. We are using stream ids so that we can avoid bugs related to live update after stream rename.
This commit is contained in:
		@@ -158,7 +158,7 @@ function format_topic(topic_data) {
 | 
			
		||||
    const last_msg = message_store.get(topic_data.last_msg_id);
 | 
			
		||||
    const stream = last_msg.stream;
 | 
			
		||||
    const stream_id = last_msg.stream_id;
 | 
			
		||||
    const stream_info = stream_data.get_sub(stream);
 | 
			
		||||
    const stream_info = stream_data.get_sub_by_id(stream_id);
 | 
			
		||||
    const topic = last_msg.topic;
 | 
			
		||||
    const time = new XDate(last_msg.timestamp * 1000);
 | 
			
		||||
    const last_msg_time = timerender.last_seen_status_from_date(time);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user