pm_conversations: Replace partners Dict with Set.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2020-01-31 19:15:22 -08:00 committed by Tim Abbott
parent 052497de1c
commit c4e1357e19
1 changed files with 3 additions and 4 deletions

View File

@ -1,14 +1,13 @@
const Dict = require('./dict').Dict;
const FoldDict = require('./fold_dict').FoldDict;
const partners = new Dict();
const partners = new Set();
exports.set_partner = function (user_id) {
partners.set(user_id, true);
partners.add(user_id);
};
exports.is_partner = function (user_id) {
return partners.get(user_id) || false;
return partners.has(user_id);
};
exports.recent = (function () {