@wireapp/core 46.0.13 → 46.0.15
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/SubconversationService/SubconversationService.d.ts +1 -1
- package/lib/conversation/SubconversationService/SubconversationService.d.ts.map +1 -1
- package/lib/conversation/SubconversationService/SubconversationService.js +3 -1
- package/lib/conversation/SubconversationService/SubconversationService.test.js +6 -5
- package/package.json +3 -3
|
@@ -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,
|
|
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,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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,QAAQ,MAAM,GAAG,SAAS,CAAC,CAO5B;IAEK,iCAAiC,sBACnB,kBAAkB,KACpC,QACD;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"}
|
|
@@ -213,7 +213,9 @@ class SubconversationService extends commons_1.TypedEventEmitter {
|
|
|
213
213
|
const isSubconversationMember = subconversationMemberIds.some(({ userId, clientId, domain }) => (0, fullyQualifiedClientIdUtils_1.constructFullyQualifiedClientId)(userId, clientId, domain) ===
|
|
214
214
|
(0, fullyQualifiedClientIdUtils_1.constructFullyQualifiedClientId)(parentMember.userId, parentMember.clientId, parentMember.domain));
|
|
215
215
|
return {
|
|
216
|
-
userid:
|
|
216
|
+
userid: this.apiClient.backendFeatures.isFederated
|
|
217
|
+
? `${parentMember.userId}@${parentMember.domain}`
|
|
218
|
+
: parentMember.userId,
|
|
217
219
|
clientid: parentMember.clientId,
|
|
218
220
|
in_subconv: isSubconversationMember,
|
|
219
221
|
};
|
|
@@ -35,8 +35,9 @@ const getSubconversationResponse = ({ epoch, epochTimestamp, parentConversationI
|
|
|
35
35
|
epoch_timestamp: epochTimestamp,
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
|
-
const buildSubconversationService = async () => {
|
|
38
|
+
const buildSubconversationService = async (isFederated = false) => {
|
|
39
39
|
const apiClient = new api_client_1.APIClient({ urls: api_client_1.APIClient.BACKEND.STAGING });
|
|
40
|
+
apiClient.backendFeatures.isFederated = isFederated;
|
|
40
41
|
const mlsService = {
|
|
41
42
|
conversationExists: jest.fn(),
|
|
42
43
|
wipeConversation: jest.fn(),
|
|
@@ -253,8 +254,8 @@ describe('SubconversationService', () => {
|
|
|
253
254
|
const response = await subconversationService.getSubconversationEpochInfo(parentConversationId, parentConversationGroupId);
|
|
254
255
|
expect(response).toEqual(null);
|
|
255
256
|
});
|
|
256
|
-
it('returns epoch info and advances epoch number', async () => {
|
|
257
|
-
const [subconversationService, { mlsService }] = await buildSubconversationService();
|
|
257
|
+
it.each([true, false])('returns epoch info and advances epoch number', async (isFederated) => {
|
|
258
|
+
const [subconversationService, { mlsService }] = await buildSubconversationService(isFederated);
|
|
258
259
|
const parentConversationId = { id: 'parentConversationId', domain: 'domain' };
|
|
259
260
|
const parentConversationGroupId = 'parentConversationGroupId';
|
|
260
261
|
const subconversationGroupId = 'subconversationGroupId';
|
|
@@ -280,8 +281,8 @@ describe('SubconversationService', () => {
|
|
|
280
281
|
epoch: mockedEpoch,
|
|
281
282
|
keyLength: 32,
|
|
282
283
|
members: [
|
|
283
|
-
{ clientid: 'clientId1', in_subconv: true, userid: 'userId1@domain' },
|
|
284
|
-
{ clientid: 'clientId2', in_subconv: false, userid: 'userId2@domain' },
|
|
284
|
+
{ clientid: 'clientId1', in_subconv: true, userid: isFederated ? 'userId1@domain' : 'userId1' },
|
|
285
|
+
{ clientid: 'clientId2', in_subconv: false, userid: isFederated ? 'userId2@domain' : 'userId2' },
|
|
285
286
|
],
|
|
286
287
|
secretKey: mockedSecretKey,
|
|
287
288
|
};
|
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.0.
|
|
14
|
+
"@wireapp/api-client": "^27.0.8",
|
|
15
15
|
"@wireapp/commons": "^5.2.8",
|
|
16
16
|
"@wireapp/core-crypto": "1.0.0-rc.60",
|
|
17
17
|
"@wireapp/cryptobox": "12.8.0",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"test:coverage": "jest --coverage",
|
|
63
63
|
"watch": "tsc --watch"
|
|
64
64
|
},
|
|
65
|
-
"version": "46.0.
|
|
66
|
-
"gitHead": "
|
|
65
|
+
"version": "46.0.15",
|
|
66
|
+
"gitHead": "e157610152d7952cb2bdb134c40a7658c012d1a3"
|
|
67
67
|
}
|