From bcfa09f7bce625663d574dfcf0cb18b9124f92f4 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 9 Jun 2020 17:40:52 +0200 Subject: [PATCH] Fix mailbox issue and add XXX --- www/common/outer/team.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 4b5c159ea..a0c785200 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -1577,6 +1577,8 @@ define([ }); }; + // XXX call mailbox.open when you create or join a team + // XXX close the mailbox hwne you leave the team var deriveMailbox = function (team) { if (!team) { return; } if (team.keys && team.keys.mailbox) { return team.keys.mailbox; } @@ -1626,7 +1628,7 @@ define([ Object.keys(teams).forEach(function (id) { ctx.onReadyHandlers[id] = []; - if (!Util.find(teams, id, 'keys', 'mailbox')) { + if (!Util.find(teams, [id, 'keys', 'mailbox'])) { teams[id].keys.mailbox = deriveMailbox(teams[id]); } openChannel(ctx, teams[id], id, waitFor(function (err) {