mirror of https://github.com/zulip/zulip.git
pm_conversations: Replace partners Dict with Set.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
052497de1c
commit
c4e1357e19
|
@ -1,14 +1,13 @@
|
||||||
const Dict = require('./dict').Dict;
|
|
||||||
const FoldDict = require('./fold_dict').FoldDict;
|
const FoldDict = require('./fold_dict').FoldDict;
|
||||||
|
|
||||||
const partners = new Dict();
|
const partners = new Set();
|
||||||
|
|
||||||
exports.set_partner = function (user_id) {
|
exports.set_partner = function (user_id) {
|
||||||
partners.set(user_id, true);
|
partners.add(user_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.is_partner = function (user_id) {
|
exports.is_partner = function (user_id) {
|
||||||
return partners.get(user_id) || false;
|
return partners.has(user_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.recent = (function () {
|
exports.recent = (function () {
|
||||||
|
|
Loading…
Reference in New Issue