@wireapp/core 46.2.2 → 46.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -38,6 +38,14 @@ export declare class SubconversationService extends TypedEventEmitter<Events> {
|
|
|
38
38
|
* @param conversationId Id of the parent conversation which subconversation we want to leave
|
|
39
39
|
*/
|
|
40
40
|
leaveConferenceSubconversation(conversationId: QualifiedId): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Short term solution to an issues with 1:1 MLS call, see
|
|
43
|
+
* https://wearezeta.atlassian.net/wiki/spaces/PAD/pages/1314750477/2024-07-29+1+1+calls+over+SFT#Do-not-leave-the-subconversation
|
|
44
|
+
* Will delete a conference subconversation when hanging up on a 1:1 call instead of leaving.
|
|
45
|
+
*
|
|
46
|
+
* @param conversationId Id of the parent conversation which subconversation we want to leave
|
|
47
|
+
*/
|
|
48
|
+
leave1on1ConferenceSubconversation(conversationId: QualifiedId): Promise<void>;
|
|
41
49
|
leaveStaleConferenceSubconversations(): Promise<void>;
|
|
42
50
|
getSubconversationEpochInfo(parentConversationId: QualifiedId, parentConversationGroupId: string, shouldAdvanceEpoch?: boolean): Promise<{
|
|
43
51
|
members: SubconversationEpochInfoMember[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubconversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/SubconversationService/SubconversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,kBAAkB,EAAkB,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAIzD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAInD,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAGlD,KAAK,MAAM,GAAG;IACZ,wBAAwB,EAAE;QAAC,cAAc,EAAE,WAAW,CAAA;KAAC,CAAC;CACzD,CAAC;AAEF,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACrB;AAID,qBAAa,sBAAuB,SAAQ,iBAAiB,CAAC,MAAM,CAAC;IAIjE,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC;IAL/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmD;gBAGvD,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,WAAW,CAAC,EAAE,UAAU,YAAA;IAK3C,IAAI,UAAU,IAAI,UAAU,CAK3B;IAED;;;;;;OAMG;IACU,6BAA6B,CACxC,cAAc,EAAE,WAAW,EAC3B,OAAO,EAAE,MAAM,EACf,WAAW,UAAO,GACjB,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;IAiD5C;;;;OAIG;IACU,8BAA8B,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"SubconversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/SubconversationService/SubconversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,kBAAkB,EAAkB,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAIzD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AAInD,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,sBAAsB,CA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AI,CAAC;IAoCI,uBAAuB,CAClC,oBAAoB,EAAE,WAAW,EACjC,yBAAyB,EAAE,MAAM,EACjC,yBAAyB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,EACvE,aAAa,EAAE,CAAC,IAAI,EAAE;QACpB,OAAO,EAAE,8BAA8B,EAAE,CAAC;QAC1C,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;KACnB,KAAK,IAAI,GACT,OAAO,CAAC,MAAM,IAAI,CAAC;IAiDT,yCAAyC,CACpD,cAAc,EAAE,WAAW,EAC3B,cAAc,EAAE;QAAC,IAAI,EAAE,WAAW,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC,GACpD,OAAO,CAAC,IAAI,CAAC;YAgCF,mCAAmC;YAMnC,4BAA4B;YAI5B,+BAA+B;YAO/B,8BAA8B;IAwBrC,yBAAyB,yBACR,WAAW,qBACd,kBAAkB,KACpC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAO5B;IAEK,iCAAiC,sBACnB,kBAAkB,KACpC,OAAO,CACR;QACE,oBAAoB,EAAE,WAAW,CAAC;QAClC,iBAAiB,EAAE,kBAAkB,CAAC;QACtC,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CACJ,CAOC;IAEK,0BAA0B,yBACT,WAAW,qBACd,kBAAkB,WAC5B,MAAM,qBAOf;IAEK,2BAA2B,yBACV,WAAW,qBACd,kBAAkB,mBAMrC;CACH"}
|
|
@@ -115,6 +115,40 @@ class SubconversationService extends commons_1.TypedEventEmitter {
|
|
|
115
115
|
// once we've left the subconversation, we can remove it from the store
|
|
116
116
|
await this.clearSubconversationGroupId(conversationId, conversation_1.SUBCONVERSATION_ID.CONFERENCE);
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Short term solution to an issues with 1:1 MLS call, see
|
|
120
|
+
* https://wearezeta.atlassian.net/wiki/spaces/PAD/pages/1314750477/2024-07-29+1+1+calls+over+SFT#Do-not-leave-the-subconversation
|
|
121
|
+
* Will delete a conference subconversation when hanging up on a 1:1 call instead of leaving.
|
|
122
|
+
*
|
|
123
|
+
* @param conversationId Id of the parent conversation which subconversation we want to leave
|
|
124
|
+
*/
|
|
125
|
+
async leave1on1ConferenceSubconversation(conversationId) {
|
|
126
|
+
const subconversationGroupId = await this.getSubconversationGroupId(conversationId, conversation_1.SUBCONVERSATION_ID.CONFERENCE);
|
|
127
|
+
if (!subconversationGroupId) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const doesGroupExistLocally = await this.mlsService.conversationExists(subconversationGroupId);
|
|
131
|
+
if (!doesGroupExistLocally) {
|
|
132
|
+
// If the subconversation was known by a client but is does not exist locally, we can remove it from the store.
|
|
133
|
+
return this.clearSubconversationGroupId(conversationId, conversation_1.SUBCONVERSATION_ID.CONFERENCE);
|
|
134
|
+
}
|
|
135
|
+
try {
|
|
136
|
+
const epochInfo = await this.getSubconversationEpochInfo(conversationId, subconversationGroupId);
|
|
137
|
+
if (!epochInfo) {
|
|
138
|
+
throw new Error('Failed to get epoch info for conference subconversation');
|
|
139
|
+
}
|
|
140
|
+
await this.apiClient.api.conversation.deleteSubconversation(conversationId, conversation_1.SUBCONVERSATION_ID.CONFERENCE, {
|
|
141
|
+
groupId: subconversationGroupId,
|
|
142
|
+
epoch: epochInfo.epoch,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
this.logger.error(`Failed to delete conference subconversation:`, error);
|
|
147
|
+
}
|
|
148
|
+
await this.mlsService.wipeConversation(subconversationGroupId);
|
|
149
|
+
// once we've deleted the subconversation, we can remove it from the store
|
|
150
|
+
await this.clearSubconversationGroupId(conversationId, conversation_1.SUBCONVERSATION_ID.CONFERENCE);
|
|
151
|
+
}
|
|
118
152
|
async leaveStaleConferenceSubconversations() {
|
|
119
153
|
const conversationIds = await this.getAllGroupIdsBySubconversationId(conversation_1.SUBCONVERSATION_ID.CONFERENCE);
|
|
120
154
|
for (const { parentConversationId } of conversationIds) {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@wireapp/api-client": "^27.3.
|
|
14
|
+
"@wireapp/api-client": "^27.3.3",
|
|
15
15
|
"@wireapp/commons": "^5.2.10",
|
|
16
16
|
"@wireapp/core-crypto": "1.0.0-rc.60",
|
|
17
17
|
"@wireapp/cryptobox": "12.8.0",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@wireapp/promise-queue": "^2.3.5",
|
|
20
20
|
"@wireapp/protocol-messaging": "1.49.0",
|
|
21
21
|
"@wireapp/store-engine": "5.1.8",
|
|
22
|
-
"axios": "1.7.
|
|
22
|
+
"axios": "1.7.3",
|
|
23
23
|
"bazinga64": "^6.3.7",
|
|
24
24
|
"deepmerge-ts": "6.0.0",
|
|
25
25
|
"hash.js": "1.1.7",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"test:coverage": "jest --coverage",
|
|
63
63
|
"watch": "tsc --watch"
|
|
64
64
|
},
|
|
65
|
-
"version": "46.2.
|
|
66
|
-
"gitHead": "
|
|
65
|
+
"version": "46.2.4",
|
|
66
|
+
"gitHead": "bc148b42b553167e0e450dc42b08665e6cc95778"
|
|
67
67
|
}
|