@wireapp/core 40.2.10 → 40.3.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Conversation, DefaultConversationRoleName, MutedStatus, NewConversation, QualifiedUserClients, RemoteConversations } from '@wireapp/api-client/lib/conversation';
|
|
1
|
+
import { Conversation, DefaultConversationRoleName, MutedStatus, NewConversation, QualifiedUserClients, RemoteConversations, PostMlsMessageResponse } 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';
|
|
@@ -74,7 +74,7 @@ export declare class ConversationService {
|
|
|
74
74
|
*/
|
|
75
75
|
addUsersToMLSConversation({ qualifiedUsers, groupId, conversationId, }: Required<AddUsersParams>): Promise<MLSReturnType>;
|
|
76
76
|
removeUsersFromMLSConversation({ groupId, conversationId, qualifiedUserIds, }: RemoveUsersParams): Promise<MLSReturnType>;
|
|
77
|
-
joinByExternalCommit(conversationId: QualifiedId): Promise<
|
|
77
|
+
joinByExternalCommit(conversationId: QualifiedId): Promise<PostMlsMessageResponse | null>;
|
|
78
78
|
/**
|
|
79
79
|
* Will send an external proposal for the current device to join a specific conversation.
|
|
80
80
|
* In order for the external proposal to be sent correctly, the underlying mls conversation needs to be in a non-established state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,YAAY,EACZ,2BAA2B,EAC3B,WAAW,EACX,eAAe,EACf,oBAAoB,EAEpB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ConversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.ts"],"names":[],"mapp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H;;;OAGG;IACU,qBAAqB,CAAC,gBAAgB,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;YAmC/E,cAAc;IAqC5B;;;;;;OAMG;IACU,yBAAyB,CAAC,EACrC,cAAc,EACd,OAAO,EACP,cAAc,GACf,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAcvC,8BAA8B,CAAC,EAC1C,OAAO,EACP,cAAc,EACd,gBAAgB,GACjB,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IAoBhC,oBAAoB,CAAC,cAAc,EAAE,WAAW;IAI7D;;;;;OAKG;IACU,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAiBvD,4BAA4B,CAAC,OAAO,EAAE,MAAM;IAI5C,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YASlD,YAAY;IAYb,mBAAmB;CA2BjC"}
|
|
@@ -183,19 +183,32 @@ class ConversationService {
|
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
185
|
async sendMLSMessage({ payload, groupId }) {
|
|
186
|
+
var _a;
|
|
186
187
|
const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
|
|
187
188
|
// immediately execute pending commits before sending the message
|
|
188
189
|
await this.mlsService.commitPendingProposals({ groupId });
|
|
189
190
|
const encrypted = await this.mlsService.encryptMessage(groupIdBytes, protocol_messaging_1.GenericMessage.encode(payload).finish());
|
|
190
|
-
let
|
|
191
|
+
let response = {
|
|
192
|
+
time: new Date().toISOString(),
|
|
193
|
+
events: [],
|
|
194
|
+
failed_to_send: {},
|
|
195
|
+
failed: [],
|
|
196
|
+
};
|
|
191
197
|
try {
|
|
192
|
-
|
|
193
|
-
sentAt = (time === null || time === void 0 ? void 0 : time.length) > 0 ? time : new Date().toISOString();
|
|
198
|
+
response = await this.apiClient.api.conversation.postMlsMessage(encrypted);
|
|
194
199
|
}
|
|
195
|
-
catch (
|
|
200
|
+
catch (_b) { }
|
|
201
|
+
const sentAt = response.time;
|
|
202
|
+
const failedToSend = response.failed || Object.keys((_a = response.failed_to_send) !== null && _a !== void 0 ? _a : {}).length > 0
|
|
203
|
+
? {
|
|
204
|
+
queued: response.failed_to_send,
|
|
205
|
+
failed: response.failed,
|
|
206
|
+
}
|
|
207
|
+
: undefined;
|
|
196
208
|
return {
|
|
197
209
|
id: payload.messageId,
|
|
198
210
|
sentAt,
|
|
211
|
+
failedToSend,
|
|
199
212
|
state: sentAt ? conversation_2.MessageSendingState.OUTGOING_SENT : conversation_2.MessageSendingState.CANCELED,
|
|
200
213
|
};
|
|
201
214
|
}
|
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": "^24.
|
|
14
|
+
"@wireapp/api-client": "^24.15.0",
|
|
15
15
|
"@wireapp/commons": "^5.1.0",
|
|
16
16
|
"@wireapp/core-crypto": "0.8.2",
|
|
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": "40.
|
|
64
|
-
"gitHead": "
|
|
63
|
+
"version": "40.3.0",
|
|
64
|
+
"gitHead": "70497814371870e1ec2ee341a3c63f992ceaf931"
|
|
65
65
|
}
|