From c4e1357e19c6b3eeb6f4be7ccb8148fca7252041 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Fri, 31 Jan 2020 19:15:22 -0800 Subject: [PATCH] pm_conversations: Replace partners Dict with Set. Signed-off-by: Anders Kaseorg --- static/js/pm_conversations.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/static/js/pm_conversations.js b/static/js/pm_conversations.js index bf8f1224f6..69e92723e9 100644 --- a/static/js/pm_conversations.js +++ b/static/js/pm_conversations.js @@ -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 () {