mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Conference updates
This commit is contained in:
parent
c64c8ab240
commit
9e165ca150
13 changed files with 494 additions and 558 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue