Skip to content

Commit

Permalink
fix: Avoid failed request to get all clients of a conversation (#14828)
Browse files Browse the repository at this point in the history
  • Loading branch information
atomrc committed Mar 14, 2023
1 parent 18a5dec commit b6876a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@emotion/react": "11.10.6",
"@types/eslint": "8.4.10",
"@wireapp/avs": "9.1.11",
"@wireapp/core": "39.2.0",
"@wireapp/core": "39.2.3",
"@wireapp/lru-cache": "3.8.1",
"@wireapp/react-ui-kit": "9.4.0",
"@wireapp/store-engine-dexie": "2.0.5",
Expand Down
8 changes: 4 additions & 4 deletions src/script/conversation/ConversationRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ export class ConversationRepository {
* Needs to be done to receive the latest epoch and avoid epoch mismatch errors
*/

const qualifiedUserIds = userEntities.map(userEntity => userEntity.qualifiedId);
const qualifiedUsers = userEntities.map(userEntity => userEntity.qualifiedId);

const {qualifiedId: conversationId, groupId} = conversation;

Expand All @@ -1366,23 +1366,23 @@ export class ConversationRepository {
const {events} = await this.core.service!.conversation.addUsersToMLSConversation({
conversationId,
groupId,
qualifiedUserIds,
qualifiedUsers,
});
if (!!events.length) {
events.forEach(event => this.eventRepository.injectEvent(event));
}
} else {
const conversationMemberJoinEvent = await this.core.service!.conversation.addUsersToProteusConversation({
conversationId,
qualifiedUserIds,
qualifiedUsers,
});
if (conversationMemberJoinEvent) {
this.eventRepository.injectEvent(conversationMemberJoinEvent, EventRepository.SOURCE.BACKEND_RESPONSE);
}
}
} catch (error) {
if (error) {
this.handleAddToConversationError(error as BackendClientError, conversation, qualifiedUserIds);
this.handleAddToConversationError(error as BackendClientError, conversation, qualifiedUsers);
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4247,9 +4247,9 @@ __metadata:
languageName: node
linkType: hard

"@wireapp/core@npm:39.2.0":
version: 39.2.0
resolution: "@wireapp/core@npm:39.2.0"
"@wireapp/core@npm:39.2.3":
version: 39.2.3
resolution: "@wireapp/core@npm:39.2.3"
dependencies:
"@wireapp/api-client": ^23.1.3
"@wireapp/commons": ^5.0.4
Expand All @@ -4268,7 +4268,7 @@ __metadata:
logdown: 3.3.1
long: ^5.2.0
uuidjs: 4.2.13
checksum: 676f98d206e643a67dc24bd3be8ae39f1949e1c944695c902f67c46f0b970fd8bd468d15373cbaa4846ea6343213c409d7eb5f6343904415c61ad85fecf3f8ba
checksum: 8cd6f57a11b6069f5d95fa9895050cee58e0a1dc27da3c9b50bc7def898520e62656e324dd25e5001b5bcaf4c19cad0c36a61b3aa3f485c1b941837f0a30f2c8
languageName: node
linkType: hard

Expand Down Expand Up @@ -16524,7 +16524,7 @@ dexie@latest:
"@typescript-eslint/parser": ^5.54.1
"@wireapp/avs": 9.1.11
"@wireapp/copy-config": 2.0.10
"@wireapp/core": 39.2.0
"@wireapp/core": 39.2.3
"@wireapp/eslint-config": 2.1.1
"@wireapp/lru-cache": 3.8.1
"@wireapp/prettier-config": 0.5.2
Expand Down

0 comments on commit b6876a8

Please sign in to comment.