mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	refactor: Rename locally_echoed to sent_by_this_client.
This is a bit clearer, since we will soon want to pass this option for messages that could not be locally echoed due to markdown rendering.
This commit is contained in:
		@@ -55,7 +55,7 @@ function maybe_add_narrowed_messages(messages, msg_list) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
exports.insert_new_messages = function insert_new_messages(messages, locally_echoed) {
 | 
			
		||||
exports.insert_new_messages = function insert_new_messages(messages, sent_by_this_client) {
 | 
			
		||||
    messages = _.map(messages, message_store.add_message_metadata);
 | 
			
		||||
 | 
			
		||||
    unread.process_loaded_messages(messages);
 | 
			
		||||
@@ -83,7 +83,7 @@ exports.insert_new_messages = function insert_new_messages(messages, locally_ech
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    if (locally_echoed) {
 | 
			
		||||
    if (sent_by_this_client) {
 | 
			
		||||
        var need_user_to_scroll = render_info && render_info.need_user_to_scroll;
 | 
			
		||||
        notifications.notify_local_mixes(messages, need_user_to_scroll);
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -588,9 +588,10 @@ exports.get_local_notify_mix_reason = function (message) {
 | 
			
		||||
 | 
			
		||||
exports.notify_local_mixes = function (messages, need_user_to_scroll) {
 | 
			
		||||
    /*
 | 
			
		||||
        This code should only be called when we are locally echoing
 | 
			
		||||
        messages.  It notifies users that their messages aren't
 | 
			
		||||
        actually in the view that they composed to.
 | 
			
		||||
        This code should only be called when we are displaying
 | 
			
		||||
        messages sent by current client. It notifies users that
 | 
			
		||||
        their messages aren't actually in the view that they
 | 
			
		||||
        composed to.
 | 
			
		||||
 | 
			
		||||
        This code is called after we insert messages into our
 | 
			
		||||
        message list widgets. All of the conditions here are
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user