diff --git a/package.json b/package.json index 586182a9fa37..ee5c49b71aec 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "@datadog/browser-rum": "^4.47.0", "@emotion/react": "11.11.1", "@wireapp/avs": "9.3.7", - "@wireapp/core": "41.7.0", + "@wireapp/core": "file:.yalc/@wireapp/core", "@wireapp/lru-cache": "3.8.1", "@wireapp/react-ui-kit": "9.9.0", "@wireapp/store-engine-dexie": "2.1.3", @@ -189,6 +189,7 @@ "configure": "copy-config", "deploy": "yarn build:prod && eb deploy", "dev": "yarn start", + "dev:elna": "PORT=8082 FEDERATION=elna FEATURE_ENABLE_FEDERATION=true URL_ACCOUNT_BASE=https://account.elna.wire.link BACKEND_REST=https://nginz-https.elna.wire.link BACKEND_WS=wss://nginz-ssl.elna.wire.link FEATURE_CHECK_CONSENT=false yarn start", "docker": "node ./bin/push_docker.js", "zip": "node ./bin/zip.js", "fix": "yarn fix:other && yarn fix:code", diff --git a/src/script/conversation/ConversationRepository.ts b/src/script/conversation/ConversationRepository.ts index 963c621237e8..fbec8969d5bd 100644 --- a/src/script/conversation/ConversationRepository.ts +++ b/src/script/conversation/ConversationRepository.ts @@ -1547,25 +1547,12 @@ export class ConversationRepository { throw new Error('Conversation service is not available!'); } - const {groupId, qualifiedId} = mlsConversation; - - //if epoch is higher that 0 it means that the group is already established, we have to join with external commit - if (mlsConversation.epoch > 0) { - await conversationService.joinByExternalCommit(qualifiedId); - return mlsConversation; - } - - const selfUserId = selfUser.qualifiedId; - - //if it's not established, establish it and add the other user to the group - await conversationService.establishMLS1to1Conversation( - groupId, - {client: this.core.clientId, user: selfUserId}, + const {members, epoch} = await conversationService.establishMLS1to1Conversation( + mlsConversation.groupId, + {client: this.core.clientId, user: selfUser.qualifiedId}, otherUserId, ); - //refetch the conversation to get the letest epoch and updated participants list - const {members, epoch} = await this.conversationService.getMLS1to1Conversation(otherUserId); ConversationMapper.updateProperties(mlsConversation, {participating_user_ids: members.others, epoch}); await this.updateParticipatingUserEntities(mlsConversation); return mlsConversation; diff --git a/yarn.lock b/yarn.lock index ea7a7d5bf92f..65eb884008f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5300,9 +5300,9 @@ __metadata: languageName: node linkType: hard -"@wireapp/core@npm:41.7.0": +"@wireapp/core@file:.yalc/@wireapp/core::locator=wire-webapp%40workspace%3A.": version: 41.7.0 - resolution: "@wireapp/core@npm:41.7.0" + resolution: "@wireapp/core@file:.yalc/@wireapp/core#.yalc/@wireapp/core::hash=a01ca9&locator=wire-webapp%40workspace%3A." dependencies: "@wireapp/api-client": ^25.4.0 "@wireapp/commons": ^5.1.0 @@ -5321,7 +5321,7 @@ __metadata: logdown: 3.3.1 long: ^5.2.0 uuidjs: 4.2.13 - checksum: 75271b475496cb706f1c2239027e0899c4219317060f10cb776550b9c973e59ae9bd8cd967a4a1f105cdb357c4ccb867f8f20807358137df3e1028b1ecad6ceb + checksum: 79091a067ec03b13baf2d23b3f9c309affae693fb2bff2dce4179c88cc69e1b903059c4187000b900d1c8e6187555818c582be84d40dfb5e76c4212788531318 languageName: node linkType: hard @@ -18478,7 +18478,7 @@ __metadata: "@types/webpack-env": 1.18.1 "@wireapp/avs": 9.3.7 "@wireapp/copy-config": 2.1.2 - "@wireapp/core": 41.7.0 + "@wireapp/core": "file:.yalc/@wireapp/core" "@wireapp/eslint-config": 3.0.1 "@wireapp/lru-cache": 3.8.1 "@wireapp/prettier-config": 0.6.0