@wireapp/core 39.3.2 → 39.3.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/Account.js
CHANGED
|
@@ -185,7 +185,7 @@ class Account extends TypedEventEmitter_1.TypedEventEmitter {
|
|
|
185
185
|
}
|
|
186
186
|
this.logger.info(`Created new client {mls: ${!!this.service.mls}, id: ${client.id}}`);
|
|
187
187
|
await this.service.notification.initializeNotificationStream();
|
|
188
|
-
await this.service.client.synchronizeClients();
|
|
188
|
+
await this.service.client.synchronizeClients(client.id);
|
|
189
189
|
return this.initClient(client);
|
|
190
190
|
}
|
|
191
191
|
async initClient(client) {
|
|
@@ -45,7 +45,11 @@ export declare class ClientService {
|
|
|
45
45
|
*/
|
|
46
46
|
loadClient(): Promise<RegisteredClient | undefined>;
|
|
47
47
|
private createLocalClient;
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* Will download all the clients of the self user (excluding the current client) and will store them in the database
|
|
50
|
+
* @param currentClient - the id of the current client (to be excluded from the list)
|
|
51
|
+
*/
|
|
52
|
+
synchronizeClients(currentClient: string): Promise<MetaClient[]>;
|
|
49
53
|
register(loginData: LoginData, clientInfo: ClientInfo, { prekeys, lastPrekey }: InitialPrekeys): Promise<RegisteredClient>;
|
|
50
54
|
}
|
|
51
55
|
//# sourceMappingURL=ClientService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientService.d.ts","sourceRoot":"","sources":["../../src/client/ClientService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAkC,gBAAgB,EAAC,MAAM,iCAAiC,CAAC;AAMlG,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAC,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAEjD,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,+BAA+B,CAAC;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S,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,EAAC,OAAO,EAAE,UAAU,EAAC,EAAE,cAAc,GACpC,OAAO,CAAC,gBAAgB,CAAC;CA4B7B"}
|
|
@@ -111,10 +111,14 @@ class ClientService {
|
|
|
111
111
|
createLocalClient(client, domain) {
|
|
112
112
|
return this.database.createLocalClient(client, domain);
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
/**
|
|
115
|
+
* Will download all the clients of the self user (excluding the current client) and will store them in the database
|
|
116
|
+
* @param currentClient - the id of the current client (to be excluded from the list)
|
|
117
|
+
*/
|
|
118
|
+
async synchronizeClients(currentClient) {
|
|
115
119
|
var _a;
|
|
116
120
|
const registeredClients = await this.backend.getClients();
|
|
117
|
-
const filteredClients = registeredClients.filter(client => client.id !==
|
|
121
|
+
const filteredClients = registeredClients.filter(client => client.id !== currentClient);
|
|
118
122
|
return this.database.createClientList({ id: this.apiClient.context.userId, domain: (_a = this.apiClient.context.domain) !== null && _a !== void 0 ? _a : '' }, filteredClients);
|
|
119
123
|
}
|
|
120
124
|
// TODO: Split functionality into "create" and "register" client
|
package/package.json
CHANGED