mirror of https://github.com/zulip/zulip.git
Add pm_conversations.recent.get_strings().
We will use this method for hotkey navigation through recent pms.
This commit is contained in:
parent
4f52e095e8
commit
9f8526ce29
|
@ -25,5 +25,7 @@ var pmc = zrequire('pm_conversations');
|
||||||
{user_ids_string: '1', timestamp: 3001},
|
{user_ids_string: '1', timestamp: 3001},
|
||||||
{user_ids_string: '2', timestamp: 2001},
|
{user_ids_string: '2', timestamp: 2001},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
assert.deepEqual(pmc.recent.get_strings(), ['1', '2']);
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,12 @@ exports.recent = (function () {
|
||||||
return recent_private_messages;
|
return recent_private_messages;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.get_strings = function () {
|
||||||
|
// returns array of structs with user_ids_string and
|
||||||
|
// timestamp
|
||||||
|
return _.pluck(recent_private_messages, 'user_ids_string');
|
||||||
|
};
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue