@wireapp/core 30.2.0 → 30.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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [30.3.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@30.2.0...@wireapp/core@30.3.0) (2022-09-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add ability to send external proposal (FS-689) ([#4376](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/issues/4376)) ([bf8e7dd](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/commit/bf8e7ddd7ea4660c8a5b6eea93e27ec14485de6c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [30.2.0](https://github.com/wireapp/wire-web-packages/tree/main/packages/core/compare/@wireapp/core@30.1.0...@wireapp/core@30.2.0) (2022-09-07)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"@otak/core-crypto": "0.3.0-es2017",
|
|
8
8
|
"@types/long": "4.0.1",
|
|
9
9
|
"@types/node": "~14",
|
|
10
|
-
"@wireapp/api-client": "20.0
|
|
10
|
+
"@wireapp/api-client": "20.1.0",
|
|
11
11
|
"@wireapp/commons": "4.3.0",
|
|
12
12
|
"@wireapp/cryptobox": "12.8.0",
|
|
13
13
|
"@wireapp/store-engine-dexie": "1.6.10",
|
|
@@ -77,6 +77,6 @@
|
|
|
77
77
|
"test:node": "nyc jasmine --config=jasmine.json",
|
|
78
78
|
"watch": "tsc ---watch"
|
|
79
79
|
},
|
|
80
|
-
"version": "30.
|
|
81
|
-
"gitHead": "
|
|
80
|
+
"version": "30.3.0",
|
|
81
|
+
"gitHead": "0a4d4b6057006da93a731115ab02c9753b155127"
|
|
82
82
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CoreCrypto } from '@otak/core-crypto';
|
|
2
2
|
import type { APIClient } from '@wireapp/api-client';
|
|
3
3
|
import { MessageSendingStatus, Conversation, DefaultConversationRoleName, MutedStatus, NewConversation, QualifiedUserClients, UserClients, ClientMismatch } from '@wireapp/api-client/src/conversation';
|
|
4
4
|
import type { ConversationMemberLeaveEvent } from '@wireapp/api-client/src/event';
|
|
@@ -157,4 +157,12 @@ export declare class ConversationService {
|
|
|
157
157
|
addUsersToMLSConversation({ qualifiedUserIds, groupId, conversationId, }: Required<AddUsersParams>): Promise<MLSReturnType>;
|
|
158
158
|
private sendCommitBundleRemovalMessages;
|
|
159
159
|
removeUsersFromMLSConversation({ groupId, conversationId, qualifiedUserIds, }: RemoveUsersParams): Promise<MLSReturnType>;
|
|
160
|
+
/**
|
|
161
|
+
* Will send an external proposal for the current device to join a specific conversation.
|
|
162
|
+
* In order for the external proposal to be sent correctly, the underlying mls conversation needs to be in a non-established state
|
|
163
|
+
* @param conversationGroupId The conversation to join
|
|
164
|
+
* @param epoch The current epoch of the local conversation
|
|
165
|
+
*/
|
|
166
|
+
sendExternalJoinProposal(conversationGroupId: string, epoch: number): Promise<void>;
|
|
167
|
+
isMLSConversationEstablished(conversationGroupId: string): Promise<boolean>;
|
|
160
168
|
}
|
|
@@ -944,6 +944,28 @@ class ConversationService {
|
|
|
944
944
|
conversation,
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
+
/**
|
|
948
|
+
* Will send an external proposal for the current device to join a specific conversation.
|
|
949
|
+
* In order for the external proposal to be sent correctly, the underlying mls conversation needs to be in a non-established state
|
|
950
|
+
* @param conversationGroupId The conversation to join
|
|
951
|
+
* @param epoch The current epoch of the local conversation
|
|
952
|
+
*/
|
|
953
|
+
async sendExternalJoinProposal(conversationGroupId, epoch) {
|
|
954
|
+
const coreCryptoClient = this.coreCryptoClientProvider();
|
|
955
|
+
const groupIdDecodedFromBase64 = bazinga64_1.Decoder.fromBase64(conversationGroupId).asBytes;
|
|
956
|
+
const externalProposal = await coreCryptoClient.newExternalProposal(0 /* Add */, {
|
|
957
|
+
epoch,
|
|
958
|
+
conversationId: groupIdDecodedFromBase64,
|
|
959
|
+
});
|
|
960
|
+
await this.apiClient.api.conversation.postMlsMessage(
|
|
961
|
+
//@todo: it's temporary - we wait for core-crypto fix to return the actual Uint8Array instead of regular array
|
|
962
|
+
optionalToUint8Array(externalProposal));
|
|
963
|
+
}
|
|
964
|
+
async isMLSConversationEstablished(conversationGroupId) {
|
|
965
|
+
const coreCryptoClient = this.coreCryptoClientProvider();
|
|
966
|
+
const groupIdDecodedFromBase64 = bazinga64_1.Decoder.fromBase64(conversationGroupId).asBytes;
|
|
967
|
+
return coreCryptoClient.conversationExists(groupIdDecodedFromBase64);
|
|
968
|
+
}
|
|
947
969
|
}
|
|
948
970
|
exports.ConversationService = ConversationService;
|
|
949
971
|
//# sourceMappingURL=ConversationService.js.map
|