Conference updates

This commit is contained in:
Isaac 2025-04-07 12:50:23 +04:00
parent c64c8ab240
commit 9e165ca150
13 changed files with 494 additions and 558 deletions

View file

@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN
- (nullable NSData *)generateRemoveParticipantsBlock:(NSArray<NSNumber *> *)participantIds;
- (nullable NSData *)encrypt:(NSData *)message;
- (nullable NSData *)encrypt:(NSData *)message channelId:(int32_t)channelId;
- (nullable NSData *)decrypt:(NSData *)message userId:(int64_t)userId;
@end

View file

@ -286,9 +286,9 @@ static NSString *hexStringFromData(NSData *data) {
return [[NSData alloc] initWithBytes:result.value().data() length:result.value().size()];
}
- (nullable NSData *)encrypt:(NSData *)message {
- (nullable NSData *)encrypt:(NSData *)message channelId:(int32_t)channelId {
std::string mappedMessage((uint8_t *)message.bytes, ((uint8_t *)message.bytes) + message.length);
auto result = tde2e_api::call_encrypt(_callId, 0, mappedMessage);
auto result = tde2e_api::call_encrypt(_callId, channelId, mappedMessage);
if (!result.is_ok()) {
return nil;
}