|
|
@ -138,11 +138,7 @@ NSString * const SocketConnectingNotification = @"SocketConnectingNotification";
|
|
|
|
[self sendWebSocketMessageAcknowledgement:message];
|
|
|
|
[self sendWebSocketMessageAcknowledgement:message];
|
|
|
|
|
|
|
|
|
|
|
|
if ([message.path isEqualToString:@"/api/v1/message"] && [message.verb isEqualToString:@"PUT"]){
|
|
|
|
if ([message.path isEqualToString:@"/api/v1/message"] && [message.verb isEqualToString:@"PUT"]){
|
|
|
|
|
|
|
|
NSData *decryptedPayload = [Cryptography decryptAppleMessagePayload:message.body
|
|
|
|
NSString *base64String = [[NSString alloc] initWithData:message.body encoding:NSUTF8StringEncoding];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NSData *encryptedSignal = [NSData dataFromBase64String:base64String];
|
|
|
|
|
|
|
|
NSData *decryptedPayload = [Cryptography decryptAppleMessagePayload:encryptedSignal
|
|
|
|
|
|
|
|
withSignalingKey:TSStorageManager.signalingKey];
|
|
|
|
withSignalingKey:TSStorageManager.signalingKey];
|
|
|
|
|
|
|
|
|
|
|
|
if (!decryptedPayload) {
|
|
|
|
if (!decryptedPayload) {
|
|
|
|