diff --git a/ts/receiver/mediumGroups.ts b/ts/receiver/mediumGroups.ts index 74eaaebc3..db6dd0d1d 100644 --- a/ts/receiver/mediumGroups.ts +++ b/ts/receiver/mediumGroups.ts @@ -323,7 +323,7 @@ async function handleMediumGroupChange( const primary = await UserUtil.getPrimary(); sanityCheckMediumGroupUpdate(primary, diff, groupUpdate); - + // console.log(`Got group update`, groupUpdate); await saveIncomingRatchetKeys(groupId, senderKeys); // Only add update message if we have something to show diff --git a/ts/session/medium_group/index.ts b/ts/session/medium_group/index.ts index 51324250f..0d899a9fe 100644 --- a/ts/session/medium_group/index.ts +++ b/ts/session/medium_group/index.ts @@ -118,12 +118,14 @@ export async function createMediumGroup( const dbMessage = await addUpdateMessage(convo, groupDiff, 'outgoing'); + // be sure to call this before sending the message. + // the sending pipeline needs to know from GroupUtils when a message is for a medium group + await updateOrCreateGroup(groupDetails); + await sendGroupUpdate(convo, groupDiff, groupDetails, dbMessage.id); // ***** 3. Add update message to the conversation ***** - await updateOrCreateGroup(groupDetails); - convo.updateGroupAdmins(admins); window.owsDesktopApp.appView.openConversation(groupId, {});