enable back swarm polling when we get added back to a group

pull/1370/head
Audric Ackermann 5 years ago
parent f031d1c357
commit 05e682cdc2
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -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…
Cancel
Save