From 08c41004a2ef4f21e96ae7ca59d1edb3da5fe1f8 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 25 Feb 2021 15:16:23 +1100 Subject: [PATCH] do not send expire timer to member added on closed group --- ts/session/group/index.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ts/session/group/index.ts b/ts/session/group/index.ts index d5cc8de88..9bfff075d 100644 --- a/ts/session/group/index.ts +++ b/ts/session/group/index.ts @@ -442,27 +442,27 @@ async function sendAddedMembers( }); // if an expire timer is set, we have to send it to the joining members - let expirationTimerMessage: ExpirationTimerUpdateMessage | undefined; - if (expireTimer && expireTimer > 0) { - const expireUpdate = { - timestamp: Date.now(), - expireTimer, - groupId: groupId, - }; - - expirationTimerMessage = new ExpirationTimerUpdateMessage(expireUpdate); - } + // let expirationTimerMessage: ExpirationTimerUpdateMessage | undefined; + // if (expireTimer && expireTimer > 0) { + // const expireUpdate = { + // timestamp: Date.now(), + // expireTimer, + // groupId: groupId, + // }; + + // expirationTimerMessage = new ExpirationTimerUpdateMessage(expireUpdate); + // } const promises = addedMembers.map(async m => { await ConversationController.getInstance().getOrCreateAndWait(m, 'private'); const memberPubKey = PubKey.cast(m); await getMessageQueue().sendToPubKey(memberPubKey, newClosedGroupUpdate); - if (expirationTimerMessage) { - await getMessageQueue().sendToPubKey( - memberPubKey, - expirationTimerMessage - ); - } + // if (expirationTimerMessage) { + // await getMessageQueue().sendToPubKey( + // memberPubKey, + // expirationTimerMessage + // ); + // } }); await Promise.all(promises); }