Skip to content

Commit

Permalink
Merge pull request #1506 from oxen-io/clearnet
Browse files Browse the repository at this point in the history
Session v1.4.9
  • Loading branch information
Bilb authored Feb 15, 2021
2 parents efab941 + 1cf6562 commit 7b08f3b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ts/receiver/closedGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,23 @@ async function handleClosedGroupMemberLeft(
}

if (didAdminLeave) {
window.SwarmPolling.removePubkey(groupPublicKey);

await removeAllClosedGroupEncryptionKeyPairs(groupPublicKey);
// Disable typing
// if the admin was remove and we are the admin, it can only be voluntary
if (isCurrentUserAdmin) {
convo.set('left', true);
} else {
convo.set('isKickedFromGroup', true);
}
}
const didWeLeaveFromAnotherDevice = !members.includes(ourPubkey);

if (didWeLeaveFromAnotherDevice) {
await removeAllClosedGroupEncryptionKeyPairs(groupPublicKey);
// Disable typing:
convo.set('isKickedFromGroup', true);
convo.set('left', true);
window.SwarmPolling.removePubkey(groupPublicKey);
}

Expand Down

0 comments on commit 7b08f3b

Please sign in to comment.