Skip to content

Commit f34d8a0

Browse files
author
Thomas Belin
authored
feat(core): Remove call to old conversations endpoint for federated backends (#11928)
1 parent 8026d87 commit f34d8a0

File tree

3 files changed

+28
-33
lines changed

3 files changed

+28
-33
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"dependencies": {
33
"@wireapp/antiscroll-2": "1.0.2",
44
"@wireapp/avs": "7.2.91",
5-
"@wireapp/core": "17.16.4",
5+
"@wireapp/core": "17.16.8",
66
"@wireapp/react-ui-kit": "7.54.0",
77
"@wireapp/store-engine-dexie": "1.6.7",
88
"@wireapp/store-engine-sqleet": "1.7.11",

src/script/conversation/ConversationService.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,11 @@ export class ConversationService {
9595
* @returns Resolves with the conversation information
9696
*/
9797
async getAllConversations(): Promise<BackendConversation[]> {
98-
const conversations = await this.apiClient.conversation.api.getAllConversations();
98+
const domain = Config.getConfig().FEATURE.FEDERATION_DOMAIN;
99+
const conversationApi = this.apiClient.conversation.api;
100+
const isFederatedBackend = Config.getConfig().FEATURE.ENABLE_FEDERATION === true && domain;
99101

100-
if (Config.getConfig().FEATURE.ENABLE_FEDERATION === true && Config.getConfig().FEATURE.FEDERATION_DOMAIN) {
101-
const remoteConversations = await this.apiClient.conversation.api.getRemoteConversations(
102-
Config.getConfig().FEATURE.FEDERATION_DOMAIN,
103-
);
104-
conversations.push(...remoteConversations);
105-
}
106-
107-
return conversations;
102+
return isFederatedBackend ? conversationApi.getConversationList(domain) : conversationApi.getAllConversations();
108103
}
109104

110105
/**

yarn.lock

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,15 +2920,15 @@
29202920
resolved "https://registry.yarnpkg.com/@wireapp/antiscroll-2/-/antiscroll-2-1.0.2.tgz#71a78d294ee0c88f42d50477ab61fa39272f5bca"
29212921
integrity sha512-9KeB3yh9k01PjpuuRQsve4yY3+OVS2/hp9j+N13Is5wYCZRkUzZVCs8w9CyA/C6J5o9ukH0EzT7uurysWuhn/A==
29222922

2923-
"@wireapp/api-client@13.8.2":
2924-
version "13.8.2"
2925-
resolved "https://registry.yarnpkg.com/@wireapp/api-client/-/api-client-13.8.2.tgz#aa48bf8dfff5e75d9084269f26444b42887ef524"
2926-
integrity sha512-lzIlUh87e04SJ4GrQdEli9ZqAfSeKnJMB/DOvd8YsjIdj1Z14o1P0UuDxgrgN+aCBOCM1AEkW6RGYo2ejOp5Mw==
2923+
"@wireapp/api-client@14.0.0":
2924+
version "14.0.0"
2925+
resolved "https://registry.yarnpkg.com/@wireapp/api-client/-/api-client-14.0.0.tgz#3c9ae880274b61dfd65dfe164697988a7d9f013b"
2926+
integrity sha512-AY/uRt/Coa+yV+sOflP3QkyhOaGmosl9eFyGWvrY8uRLdjeIENE4IrTkTGsTTZ0h7U8EoIDEVYrgoAPOzEKChQ==
29272927
dependencies:
29282928
"@types/node" "~14"
29292929
"@types/spark-md5" "3.0.2"
29302930
"@types/tough-cookie" "4.0.1"
2931-
"@wireapp/commons" "4.2.12"
2931+
"@wireapp/commons" "4.2.13"
29322932
"@wireapp/priority-queue" "1.6.37"
29332933
"@wireapp/protocol-messaging" "1.35.0"
29342934
axios "0.21.4"
@@ -2950,15 +2950,15 @@
29502950
resolved "https://registry.yarnpkg.com/@wireapp/cbor/-/cbor-4.7.2.tgz#cf890cbd1af6f684fd06c704e96b3186bd0672f3"
29512951
integrity sha512-SfWI1pfwPLpYDC2gkQIOtVFA51x1LFbWoZ5qPp9wit5l3x1CWIpmGK3g1F06XXJn/HeRHJawwp28pzzH58h2iQ==
29522952

2953-
"@wireapp/[email protected].12":
2954-
version "4.2.12"
2955-
resolved "https://registry.yarnpkg.com/@wireapp/commons/-/commons-4.2.12.tgz#2121cd9e40fa6252d18e18830f615d90e80e74c4"
2956-
integrity sha512-wbSpRUkdTgOs/F8tazPqo3iBjp/5xTA4VY44MOQW7c8hMZuVxJbENrJW6w8ZbipiaJO3jXsYS01cXF2TfIvLdA==
2953+
"@wireapp/[email protected].13":
2954+
version "4.2.13"
2955+
resolved "https://registry.yarnpkg.com/@wireapp/commons/-/commons-4.2.13.tgz#a2b8d51ecd0604cb714c6281256608a476c7f86e"
2956+
integrity sha512-9iCXslLrc78Duu7h+ciGxSswzqeXN1zfPrDhOkaMVoqIDLJ0MjUHlZMOqq8eL7Sdiq/J00YUN419OVFs77+kKQ==
29572957
dependencies:
29582958
"@types/fs-extra" "9.0.12"
29592959
"@types/node" "~14"
29602960
"@types/platform" "1.3.4"
2961-
ansi-regex "5.0.0"
2961+
ansi-regex "5.0.1"
29622962
fs-extra "10.0.0"
29632963
logdown "3.3.1"
29642964
platform "1.3.6"
@@ -2977,14 +2977,14 @@
29772977
logdown "3.3.1"
29782978
rimraf "3.0.2"
29792979

2980-
"@wireapp/[email protected].4":
2981-
version "17.16.4"
2982-
resolved "https://registry.yarnpkg.com/@wireapp/core/-/core-17.16.4.tgz#99037e1b8b4d863b205e8174653789e8cbb2a0e9"
2983-
integrity sha512-V3/lJs0kjKklStepN+3zKKqGVpDCHiK/S7K5JJPecGJ+vyZBf5x+6MROFLVE+IMNAc+Ax05atntFCPJyKryobg==
2980+
"@wireapp/[email protected].8":
2981+
version "17.16.8"
2982+
resolved "https://registry.yarnpkg.com/@wireapp/core/-/core-17.16.8.tgz#5f5e610f0ad9bd520fdb234bc67c4533ef955d67"
2983+
integrity sha512-3mcFDn8W8PpSOV1Ctlh2VwlxD2iyFL8KJbAbV8DN1g4a1eBTfpRXcZKbfPfeWxu03izjR7UclwaJYSVnkgYCrQ==
29842984
dependencies:
29852985
"@types/long" "4.0.1"
29862986
"@types/node" "~14"
2987-
"@wireapp/api-client" "13.8.2"
2987+
"@wireapp/api-client" "14.0.0"
29882988
"@wireapp/cryptobox" "12.7.1"
29892989
bazinga64 "5.9.7"
29902990
hash.js "1.1.7"
@@ -3313,10 +3313,10 @@ [email protected]:
33133313
resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41"
33143314
integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==
33153315

3316-
[email protected].0, ansi-regex@^5.0.0:
3317-
version "5.0.0"
3318-
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
3319-
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
3316+
[email protected].1, ansi-regex@^5.0.1:
3317+
version "5.0.1"
3318+
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
3319+
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
33203320

33213321
ansi-regex@^2.0.0:
33223322
version "2.1.1"
@@ -3333,10 +3333,10 @@ ansi-regex@^4.1.0:
33333333
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
33343334
integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
33353335

3336-
ansi-regex@^5.0.1:
3337-
version "5.0.1"
3338-
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
3339-
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
3336+
ansi-regex@^5.0.0:
3337+
version "5.0.0"
3338+
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
3339+
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
33403340

33413341
ansi-styles@^2.2.1:
33423342
version "2.2.1"

0 commit comments

Comments
 (0)