mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
enable back swarm polling when we get added back to a group
This commit is contained in:
parent
f031d1c357
commit
05e682cdc2
|
@ -331,6 +331,8 @@ async function handleMediumGroupChange(
|
|||
// Enable typing:
|
||||
maybeConvo.set('isKickedFromGroup', false);
|
||||
maybeConvo.set('left', false);
|
||||
// Subscribe to this group id
|
||||
window.SwarmPolling.addGroupId(new PubKey(groupId));
|
||||
maybeConvo.updateTextInputState();
|
||||
}
|
||||
}
|
||||
|
@ -342,8 +344,7 @@ async function handleMediumGroupChange(
|
|||
const userSenderKey = await createSenderKeyForGroup(groupId, primary);
|
||||
window.log.warn(
|
||||
'Sharing our new senderKey with remainingMembers via message',
|
||||
members,
|
||||
userSenderKey
|
||||
members
|
||||
);
|
||||
|
||||
await shareSenderKeys(groupId, members, userSenderKey);
|
||||
|
|
|
@ -51,12 +51,16 @@ export class SwarmPolling {
|
|||
}
|
||||
|
||||
public addGroupId(pubkey: PubKey) {
|
||||
this.groupPubkeys.push(pubkey);
|
||||
if (this.groupPubkeys.findIndex(m => m.key === pubkey.key) === -1) {
|
||||
this.groupPubkeys.push(pubkey);
|
||||
}
|
||||
}
|
||||
|
||||
public addPubkey(pk: PubKey | string) {
|
||||
const pubkey = PubKey.cast(pk);
|
||||
this.pubkeys.push(pubkey);
|
||||
if (this.pubkeys.findIndex(m => m.key === pubkey.key) === -1) {
|
||||
this.pubkeys.push(pubkey);
|
||||
}
|
||||
}
|
||||
|
||||
public removePubkey(pk: PubKey | string) {
|
||||
|
|
Loading…
Reference in a new issue