@wireapp/core 38.5.1 → 38.5.3
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/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoboxWrapper.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoboxWrapper.js +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/sessionIdMigrator.d.ts.map +1 -1
- package/lib/messagingProtocols/proteus/ProteusService/sessionIdMigrator.js +7 -9
- package/package.json +2 -2
package/lib/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoboxWrapper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CryptoboxWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoboxWrapper.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AAEpD,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAC,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AAElE,KAAK,MAAM,GAAG;IACZ,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,wBAAgB,WAAW,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,oBAGxF;
|
|
1
|
+
{"version":3,"file":"CryptoboxWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/messagingProtocols/proteus/ProteusService/CryptoClient/CryptoboxWrapper.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,8BAA8B,CAAC;AAEpD,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAC,YAAY,EAAiB,MAAM,sBAAsB,CAAC;AAElE,KAAK,MAAM,GAAG;IACZ,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,wBAAgB,WAAW,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG;IAAC,SAAS,EAAE,MAAM,CAAA;CAAC,oBAGxF;AAED,qBAAa,gBAAiB,YAAW,YAAY;IACvC,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM;IAOjE,eAAe;IAIT,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,UAAU;IASvD,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;IAIxC,IAAI;IAIJ,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU;;;;;;;;;;IAkB/C,cAAc;IAId,oBAAoB,CAAC,SAAS,EAAE,MAAM;IAK5C,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU;IAInD,aAAa;IAIb,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU;IAIvD,aAAa,CAAC,SAAS,EAAE,MAAM;IAQ/B,WAAW;IAIX,aAAa,CAAC,SAAS,EAAE,MAAM;IAI/B,SAAS,CAAC,EAAE,EAAE,MAAM;;;;IAKpB,iBAAiB,CAAC,SAAS,EAAE,MAAM;IAOnC,kBAAkB;IAIlB,IAAI;CACX"}
|
|
@@ -23,7 +23,7 @@ const cryptobox_1 = require("@wireapp/cryptobox");
|
|
|
23
23
|
const CryptoClient_types_1 = require("./CryptoClient.types");
|
|
24
24
|
function buildClient(storeEngine, config) {
|
|
25
25
|
const cryptobox = new cryptobox_1.Cryptobox(storeEngine, config.nbPrekeys);
|
|
26
|
-
return new CryptoboxWrapper(cryptobox,
|
|
26
|
+
return new CryptoboxWrapper(cryptobox, config);
|
|
27
27
|
}
|
|
28
28
|
exports.buildClient = buildClient;
|
|
29
29
|
class CryptoboxWrapper {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionIdMigrator.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/proteus/ProteusService/sessionIdMigrator.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"sessionIdMigrator.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/proteus/ProteusService/sessionIdMigrator.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AASjD;;;;;;GAMG;AACH,wBAAsB,4BAA4B,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAgBhG"}
|
|
@@ -32,16 +32,14 @@ async function migrateToQualifiedSessionIds(storeEngine, defaultDomain) {
|
|
|
32
32
|
const updatedSessions = (await storeEngine.readAll(sessionTableName))
|
|
33
33
|
.filter(session => !isFullyQualified.test(session.id))
|
|
34
34
|
.reduce((acc, session) => {
|
|
35
|
-
return {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
return acc.concat({
|
|
36
|
+
oldId: session.id,
|
|
37
|
+
newSession: Object.assign(Object.assign({}, session), { id: `${defaultDomain}@${session.id}` }),
|
|
38
|
+
});
|
|
39
|
+
}, []);
|
|
40
|
+
for (const { oldId, newSession } of updatedSessions) {
|
|
41
|
+
// In order to change primaryKeys, we need to first delete all the record and re-add them with the new key
|
|
42
42
|
await storeEngine.delete(sessionTableName, oldId);
|
|
43
|
-
}
|
|
44
|
-
for (const newSession of updatedSessions.newSessions) {
|
|
45
43
|
await storeEngine.create(sessionTableName, newSession.id, newSession);
|
|
46
44
|
}
|
|
47
45
|
}
|
package/package.json
CHANGED