mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
fe7171dd93
After provisioning a desktop client, you'll see messages sent from your phone appear on your desktop client, and messages sent from the desktop client appear on your phone. * In the process extracted some of the Attachment processing logic out of the giant MessagesManager. * Some nullability annotations on affected files. // FREEBIE
36 lines
890 B
Objective-C
36 lines
890 B
Objective-C
// Created by Frederic Jacobs on 18/11/14.
|
|
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
|
|
|
#import "OWSMessageServiceParams.h"
|
|
#import "NSData+Base64.h"
|
|
#import "TSConstants.h"
|
|
|
|
@implementation OWSMessageServiceParams
|
|
|
|
+ (NSDictionary *)JSONKeyPathsByPropertyKey
|
|
{
|
|
return [NSDictionary mtl_identityPropertyMapWithModel:[self class]];
|
|
}
|
|
|
|
- (instancetype)initWithType:(TSWhisperMessageType)type
|
|
recipientId:(NSString *)destination
|
|
device:(int)deviceId
|
|
content:(NSData *)content
|
|
registrationId:(int)registrationId
|
|
{
|
|
self = [super init];
|
|
|
|
if (!self) {
|
|
return self;
|
|
}
|
|
|
|
_type = type;
|
|
_destination = destination;
|
|
_destinationDeviceId = deviceId;
|
|
_destinationRegistrationId = registrationId;
|
|
_content = [content base64EncodedString];
|
|
|
|
return self;
|
|
}
|
|
|
|
@end
|