Skip to content

Commit 2720bd8

Browse files
authored
chore: Bump @wireapp/core from 46.46.0 to 46.46.1 (#19759)
* chore: Bump @wireapp/core from 46.46.0 to 46.46.1 * fix: Do not fetch backend to update MLS conversation properties upon reset event arrival [WPB-21618]
1 parent 83e7ff1 commit 2720bd8

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@wireapp/avs": "10.2.17",
1717
"@wireapp/avs-debugger": "0.0.7",
1818
"@wireapp/commons": "5.4.9",
19-
"@wireapp/core": "46.46.0",
19+
"@wireapp/core": "46.46.1",
2020
"@wireapp/kalium-backup": "0.0.4",
2121
"@wireapp/promise-queue": "2.4.9",
2222
"@wireapp/react-ui-kit": "9.69.0",

src/script/repositories/conversation/ConversationRepository.ts

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4359,13 +4359,36 @@ export class ConversationRepository {
43594359
*/
43604360
private async onMLSResetMessage(conversationEntity: Conversation, eventJson: ConversationMLSResetEvent) {
43614361
try {
4362+
this.logger.info(`Handling MLS reset event for conversation ${conversationEntity.id}`, {eventJson});
43624363
if (!isMLSConversation(conversationEntity)) {
4364+
this.logger.warn(
4365+
`Received MLS reset event for a conversation that is not MLS capable: ${conversationEntity.id}`,
4366+
);
43634367
return;
43644368
}
43654369

4366-
await this.core.service?.conversation.wipeMLSConversation(eventJson.data.group_id);
4370+
const {new_group_id: newGroupId, group_id: oldGroupId} = eventJson.data;
4371+
4372+
await this.core.service?.conversation.wipeMLSConversation(oldGroupId);
4373+
const exisitingConversation = this.core.service?.conversation.mlsGroupExistsLocally(newGroupId);
43674374

4368-
await this.refreshConversationProtocolProperties(conversationEntity);
4375+
if (exisitingConversation) {
4376+
this.logger.info(
4377+
'An MLS conversation with the new group ID already exists on core crypto. no need to update epoch',
4378+
);
4379+
return;
4380+
}
4381+
4382+
const updatedConversation = ConversationMapper.updateProperties(conversationEntity, {
4383+
epoch: 0,
4384+
groupId: newGroupId,
4385+
});
4386+
4387+
await this.saveConversationStateInDb(updatedConversation);
4388+
4389+
this.logger.info(
4390+
`Updated conversation group ID from ${oldGroupId} to ${newGroupId} for conversation ${conversationEntity.id} and set epoch to 0`,
4391+
);
43694392
} catch (error) {
43704393
this.logger.error(`Failed to reset MLS conversation ${conversationEntity.id}`, error);
43714394
}

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8684,9 +8684,9 @@ __metadata:
86848684
languageName: node
86858685
linkType: hard
86868686

8687-
"@wireapp/core@npm:46.46.0":
8688-
version: 46.46.0
8689-
resolution: "@wireapp/core@npm:46.46.0"
8687+
"@wireapp/core@npm:46.46.1":
8688+
version: 46.46.1
8689+
resolution: "@wireapp/core@npm:46.46.1"
86908690
dependencies:
86918691
"@wireapp/api-client": "npm:^27.89.0"
86928692
"@wireapp/commons": "npm:^5.4.9"
@@ -8706,7 +8706,7 @@ __metadata:
87068706
long: "npm:^5.2.0"
87078707
uuid: "npm:9.0.1"
87088708
zod: "npm:3.24.2"
8709-
checksum: 10/ce543416fad1667434c12ff3f6e8af12a9bc305277b12c156f5f80538d03c10b44f4de7ab548b5b8b58abb2618028dffefa813bcc8e07d4bea4dfceb7bfa4085
8709+
checksum: 10/bf24fb3e9c9b41a8e092ca3d7839e15c2a33a8a3727cc8d1145a6b34f9b381e8a34d6cbded9f8132e4de1accdd71b39c000f93a299e12ec8fb31ae8d5ee1dea0
87108710
languageName: node
87118711
linkType: hard
87128712

@@ -22653,7 +22653,7 @@ __metadata:
2265322653
"@wireapp/avs-debugger": "npm:0.0.7"
2265422654
"@wireapp/commons": "npm:5.4.9"
2265522655
"@wireapp/copy-config": "npm:2.3.4"
22656-
"@wireapp/core": "npm:46.46.0"
22656+
"@wireapp/core": "npm:46.46.1"
2265722657
"@wireapp/eslint-config": "npm:3.0.7"
2265822658
"@wireapp/kalium-backup": "npm:0.0.4"
2265922659
"@wireapp/prettier-config": "npm:0.6.9"

0 commit comments

Comments
 (0)