mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	Use data-user-ids-string in Private Messages sidebar.
This commit also changed message_store.recent_private_messages to use user_ids_string instead of reply_to.
This commit is contained in:
		@@ -5,6 +5,7 @@ add_dependencies({
 | 
			
		||||
    templates: 'js/templates',
 | 
			
		||||
    muting: 'js/muting',
 | 
			
		||||
    narrow: 'js/narrow',
 | 
			
		||||
    people: 'js/people',
 | 
			
		||||
    stream_color: 'js/stream_color',
 | 
			
		||||
    stream_data: 'js/stream_data',
 | 
			
		||||
    subs: 'js/subs',
 | 
			
		||||
@@ -33,15 +34,27 @@ global.compile_template('sidebar_private_message_list');
 | 
			
		||||
global.compile_template('stream_sidebar_row');
 | 
			
		||||
global.compile_template('stream_privacy');
 | 
			
		||||
 | 
			
		||||
var alice = {
 | 
			
		||||
    email: 'alice@zulip.com',
 | 
			
		||||
    user_id: 101,
 | 
			
		||||
    full_name: 'Alice'
 | 
			
		||||
};
 | 
			
		||||
var bob = {
 | 
			
		||||
    email: 'bob@zulip.com',
 | 
			
		||||
    user_id: 102,
 | 
			
		||||
    full_name: 'Bob'
 | 
			
		||||
};
 | 
			
		||||
global.people.add_in_realm(alice);
 | 
			
		||||
global.people.add_in_realm(bob);
 | 
			
		||||
 | 
			
		||||
(function test_build_private_messages_list() {
 | 
			
		||||
    var reply_tos = "alice@zulip.com,bob@zulip.com";
 | 
			
		||||
    var active_conversation = "Alice, Bob";
 | 
			
		||||
    var active_conversation = "alice@zulip.com,bob@zulip.com";
 | 
			
		||||
    var max_conversations = 5;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    var conversations = {reply_to: reply_tos,
 | 
			
		||||
                      display_reply_to: active_conversation,
 | 
			
		||||
                      timestamp: 0 };
 | 
			
		||||
    var conversations = {user_ids_string: '101,102',
 | 
			
		||||
                         display_reply_to: active_conversation,
 | 
			
		||||
                         timestamp: 0 };
 | 
			
		||||
    global.message_store.recent_private_messages.push(conversations);
 | 
			
		||||
 | 
			
		||||
    global.unread.num_unread_for_person = function () {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user