diff --git a/www/common/outer/team.js b/www/common/outer/team.js index b2ebf2f40..ea509d0a0 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -143,8 +143,8 @@ define([ if (state.members) { Object.keys(state.members).forEach(function (curve) { var m = state.members[curve]; - if (m.inviteChannel) { list.push(m.inviteChannel); } - if (m.previewChannel) { list.push(m.previewChannel); } + if (m.inviteChannel && m.pending) { list.push(m.inviteChannel); } + if (m.previewChannel && m.pending) { list.push(m.previewChannel); } }); } @@ -1485,6 +1485,7 @@ define([ var acceptLinkInvitation = function (ctx, data, cId, cb) { var inviteContent; + var rosterState; nThen(function (waitFor) { // Get team keys and ephemeral keys getInviteContent(ctx, data, cId, waitFor(function (obj) { diff --git a/www/teams/inner.js b/www/teams/inner.js index b5f330074..62ba0b718 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -748,24 +748,28 @@ define([ var me = roster[userData.curvePublic] || {}; var owner = Object.keys(roster).filter(function (k) { if (roster[k].pending) { return; } + roster[k].curvePublic = k; return roster[k].role === "OWNER" || roster[k].pendingOwner; }).map(function (k) { return makeMember(common, roster[k], me, roster); }); var admins = Object.keys(roster).filter(function (k) { if (roster[k].pending) { return; } + roster[k].curvePublic = k; return roster[k].role === "ADMIN"; }).map(function (k) { return makeMember(common, roster[k], me); }); var members = Object.keys(roster).filter(function (k) { if (roster[k].pending) { return; } + roster[k].curvePublic = k; return roster[k].role === "MEMBER" || !roster[k].role; }).map(function (k) { return makeMember(common, roster[k], me); }); var viewers = Object.keys(roster).filter(function (k) { if (roster[k].pending) { return; } + roster[k].curvePublic = k; return roster[k].role === "VIEWER"; }).map(function (k) { return makeMember(common, roster[k], me); @@ -773,6 +777,7 @@ define([ var pending = Object.keys(roster).filter(function (k) { if (!roster[k].pending) { return; } if (roster[k].inviteChannel) { return; } + roster[k].curvePublic = k; return roster[k].role === "MEMBER" || roster[k].role === "VIEWER" || !roster[k].role; }).map(function (k) { return makeMember(common, roster[k], me); @@ -780,6 +785,7 @@ define([ var links = Object.keys(roster).filter(function (k) { if (!roster[k].pending) { return; } if (!roster[k].inviteChannel) { return; } + roster[k].curvePublic = k; return roster[k].role === "VIEWER" || !roster[k].role; }).map(function (k) { return makeMember(common, roster[k], me);