@wireapp/core 38.5.3 → 38.6.0
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.
- package/lib/conversation/ConversationService/ConversationService.d.ts +4 -3
- package/lib/conversation/ConversationService/ConversationService.d.ts.map +1 -1
- package/lib/conversation/ConversationService/ConversationService.js +11 -8
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +1 -0
- package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
- package/lib/messagingProtocols/mls/MLSService/MLSService.js +9 -4
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Conversation, DefaultConversationRoleName, MutedStatus, NewConversation, QualifiedUserClients, UserClients } from '@wireapp/api-client/lib/conversation';
|
|
1
|
+
import { Conversation, DefaultConversationRoleName, MutedStatus, NewConversation, QualifiedUserClients, UserClients, SUBCONVERSATION_ID, Subconversation, RemoteConversations } from '@wireapp/api-client/lib/conversation';
|
|
2
2
|
import { ConversationMemberLeaveEvent } from '@wireapp/api-client/lib/event';
|
|
3
3
|
import { QualifiedId } from '@wireapp/api-client/lib/user';
|
|
4
4
|
import { XOR } from '@wireapp/commons/lib/util/TypeUtil';
|
|
@@ -49,8 +49,9 @@ export declare class ConversationService {
|
|
|
49
49
|
* @returns Resolves when the conversation was created
|
|
50
50
|
*/
|
|
51
51
|
createProteusConversation(conversationData: NewConversation): Promise<Conversation>;
|
|
52
|
-
|
|
53
|
-
getConversations(conversationIds?:
|
|
52
|
+
getConversation(conversationId: QualifiedId): Promise<Conversation>;
|
|
53
|
+
getConversations(conversationIds?: QualifiedId[]): Promise<RemoteConversations>;
|
|
54
|
+
getSubconversation(conversationId: QualifiedId, subconversationId: SUBCONVERSATION_ID): Promise<Subconversation>;
|
|
54
55
|
getAsset({ assetId, assetToken, otrKey, sha256 }: RemoteData): Promise<Uint8Array>;
|
|
55
56
|
getUnencryptedAsset(assetId: string, assetToken?: string): Promise<ArrayBuffer>;
|
|
56
57
|
addUsersToProteusConversation(params: AddUsersToProteusConversationParams): Promise<import("@wireapp/api-client/lib/event").ConversationMemberJoinEvent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,YAAY,EACZ,2BAA2B,EAC3B,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,WAAW,
|
|
1
|
+
{"version":3,"file":"ConversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,YAAY,EACZ,2BAA2B,EAC3B,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,WAAW,EAGX,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACpB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAC,4BAA4B,EAAC,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAC,GAAG,EAAC,MAAM,oCAAoC,CAAC;AAIvD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAC,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAE5G,OAAO,EAAC,YAAY,EAAuB,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEzF,OAAO,EAAC,UAAU,EAAuB,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAkC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AACjG,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACzB,MAAM,sEAAsE,CAAC;AAG9E,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAItC,qBAAa,mBAAmB;IAM5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC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,EAAE,KAAK,EAAE,MAAM;IAiBvD,4BAA4B,CAAC,OAAO,EAAE,MAAM;IAK5C,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;YAItD,YAAY;IAYb,mBAAmB;CA2BjC"}
|
|
@@ -109,14 +109,17 @@ class ConversationService {
|
|
|
109
109
|
async createProteusConversation(conversationData, otherUserIds) {
|
|
110
110
|
return this.proteusService.createConversation({ conversationData, otherUserIds });
|
|
111
111
|
}
|
|
112
|
+
async getConversation(conversationId) {
|
|
113
|
+
return this.apiClient.api.conversation.getConversation(conversationId);
|
|
114
|
+
}
|
|
112
115
|
async getConversations(conversationIds) {
|
|
113
|
-
if (!conversationIds
|
|
114
|
-
return this.apiClient.api.conversation.
|
|
115
|
-
}
|
|
116
|
-
if (typeof conversationIds === 'string') {
|
|
117
|
-
return this.apiClient.api.conversation.getConversation(conversationIds);
|
|
116
|
+
if (!conversationIds) {
|
|
117
|
+
return this.apiClient.api.conversation.getConversationList();
|
|
118
118
|
}
|
|
119
|
-
return this.apiClient.api.conversation.
|
|
119
|
+
return this.apiClient.api.conversation.getConversationsByQualifiedIds(conversationIds);
|
|
120
|
+
}
|
|
121
|
+
async getSubconversation(conversationId, subconversationId) {
|
|
122
|
+
return this.apiClient.api.conversation.getSubconversation(conversationId, subconversationId);
|
|
120
123
|
}
|
|
121
124
|
async getAsset({ assetId, assetToken, otrKey, sha256 }) {
|
|
122
125
|
const request = this.apiClient.api.asset.getAssetV3(assetId, assetToken);
|
|
@@ -241,7 +244,7 @@ class ConversationService {
|
|
|
241
244
|
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
242
245
|
const coreCryptoKeyPackagesPayload = await this.mlsService.getKeyPackagesPayload([...qualifiedUserIds]);
|
|
243
246
|
const response = await this.mlsService.addUsersToExistingConversation(groupIdBytes, coreCryptoKeyPackagesPayload);
|
|
244
|
-
const conversation = await this.
|
|
247
|
+
const conversation = await this.getConversation(conversationId);
|
|
245
248
|
//We store the info when user was added (and key material was created), so we will know when to renew it
|
|
246
249
|
this.mlsService.resetKeyMaterialRenewal(groupId);
|
|
247
250
|
return {
|
|
@@ -256,7 +259,7 @@ class ConversationService {
|
|
|
256
259
|
const messageResponse = await this.mlsService.removeClientsFromConversation(groupIdBytes, fullyQualifiedClientIds);
|
|
257
260
|
//key material gets updated after removing a user from the group, so we can reset last key update time value in the store
|
|
258
261
|
this.mlsService.resetKeyMaterialRenewal(groupId);
|
|
259
|
-
const conversation = await this.
|
|
262
|
+
const conversation = await this.getConversation(conversationId);
|
|
260
263
|
return {
|
|
261
264
|
events: (messageResponse === null || messageResponse === void 0 ? void 0 : messageResponse.events) || [],
|
|
262
265
|
conversation,
|
|
@@ -37,6 +37,7 @@ export declare class MLSService {
|
|
|
37
37
|
secretKey: string;
|
|
38
38
|
keyLength: number;
|
|
39
39
|
}>;
|
|
40
|
+
private exportSecretKey;
|
|
40
41
|
newExternalProposal(externalProposalType: ExternalProposalType, args: ExternalProposalArgs | ExternalRemoveProposalArgs): Promise<Uint8Array>;
|
|
41
42
|
processWelcomeMessage(welcomeMessage: Uint8Array): Promise<ConversationId>;
|
|
42
43
|
decryptMessage(conversationId: ConversationId, payload: Uint8Array): Promise<DecryptedMessage>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLSService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,sBAAsB,EAAqB,MAAM,sCAAsC,CAAC;AAChG,OAAO,EAAC,eAAe,EAAC,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAGzD,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EACL,eAAe,EAGf,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,oBAAoB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,iBAAiB,CAAC,EAAE,MAAM,GACzB,OAAO,CAAC,MAAM,CAAC;IAYlB;;;;;;;OAOG;IACU,sBAAsB,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAC,EAAE,4BAA4B;IAoBjG;;;;;OAKG;IACU,sBAAsB,CAAC,EAAC,OAAO,EAAE,UAAkB,EAAC,EAAE,4BAA4B;IAa/F;;;;OAIG;IACU,6BAA6B;IAiB1C;;;;OAIG;IACU,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CAY1G"}
|
|
@@ -184,19 +184,24 @@ class MLSService {
|
|
|
184
184
|
await this.registerConversation(subconversation.group_id, []);
|
|
185
185
|
}
|
|
186
186
|
else {
|
|
187
|
+
//TODO: check timestamp, if subconv is older than 24h -> delete and re-create subconversation
|
|
187
188
|
await this.joinByExternalCommit(() => this.apiClient.api.conversation.getSubconversationGroupInfo(conversationId, conversation_1.SUBCONVERSATION_ID.CONFERENCE));
|
|
188
189
|
}
|
|
189
190
|
// We store the mapping between the subconversation and the parent conversation
|
|
190
191
|
(0, subconversationGroupIdMapper_1.storeSubconversationGroupId)(conversationId, subconversation.subconv_id, subconversation.group_id);
|
|
191
|
-
const keyLength =
|
|
192
|
-
const
|
|
193
|
-
const secretKey = await this.coreCryptoClient.exportSecretKey(groupIdBytes, keyLength);
|
|
192
|
+
const keyLength = 32;
|
|
193
|
+
const secretKey = await this.exportSecretKey(subconversation.group_id, keyLength);
|
|
194
194
|
return {
|
|
195
195
|
subconversation,
|
|
196
|
-
secretKey
|
|
196
|
+
secretKey,
|
|
197
197
|
keyLength,
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
+
async exportSecretKey(groupId, keyLength) {
|
|
201
|
+
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
202
|
+
const key = await this.coreCryptoClient.exportSecretKey(groupIdBytes, keyLength);
|
|
203
|
+
return bazinga64_1.Encoder.toBase64(key).asString;
|
|
204
|
+
}
|
|
200
205
|
async newExternalProposal(externalProposalType, args) {
|
|
201
206
|
return this.coreCryptoClient.newExternalProposal(externalProposalType, args);
|
|
202
207
|
}
|
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": "^22.14.
|
|
14
|
+
"@wireapp/api-client": "^22.14.4",
|
|
15
15
|
"@wireapp/commons": "^5.0.4",
|
|
16
16
|
"@wireapp/core-crypto": "0.6.0-rc.3",
|
|
17
17
|
"@wireapp/cryptobox": "12.8.0",
|
|
@@ -60,6 +60,6 @@
|
|
|
60
60
|
"test:coverage": "jest --coverage",
|
|
61
61
|
"watch": "tsc --watch"
|
|
62
62
|
},
|
|
63
|
-
"version": "38.
|
|
64
|
-
"gitHead": "
|
|
63
|
+
"version": "38.6.0",
|
|
64
|
+
"gitHead": "c9fb9bf799a0b71dbd55c51081080485cf8e5699"
|
|
65
65
|
}
|