Fix reset pin with teams

This commit is contained in:
yflory 2019-09-17 16:33:13 +02:00
parent 74d7c00134
commit 02cd15882b
2 changed files with 17 additions and 0 deletions

View File

@ -184,6 +184,21 @@ define([
list = list.concat(mList);
}
if (store.proxy.teams) {
Object.keys(store.proxy.teams).forEach(function (id) {
var team = store.proxy.teams[id];
if (!team.owner) { return; }
list.push(team.channel);
var chatChannel = Util.find(team, ['keys', 'chat', 'channel']);
var membersChannel = Util.find(team, ['keys', 'members', 'channel']);
var mailboxChannel = Util.find(team, ['keys', 'mailbox', 'channel']);
if (chatChannel) { list.push(chatChannel); }
if (membersChannel) { list.push(membersChannel); }
if (mailboxChannel) { list.push(mailboxChannel); }
// XXX team mailbox
});
}
list.push(userChannel);
list.sort();

View File

@ -352,6 +352,8 @@ define([
}
};
ctx.store.proxy.teams[id] = {
owner: true,
channel: secret.channel,
hash: hash,
password: password,
keys: keys,