mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
39 lines
931 B
Objective-C
39 lines
931 B
Objective-C
//
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import "OWSMessageServiceParams.h"
|
|
#import "TSConstants.h"
|
|
#import <SignalCoreKit/NSData+OWS.h>
|
|
|
|
@implementation OWSMessageServiceParams
|
|
|
|
+ (NSDictionary *)JSONKeyPathsByPropertyKey
|
|
{
|
|
return [NSDictionary mtl_identityPropertyMapWithModel:[self class]];
|
|
}
|
|
|
|
- (instancetype)initWithType:(TSWhisperMessageType)type
|
|
recipientId:(NSString *)destination
|
|
device:(int)deviceId
|
|
content:(NSData *)content
|
|
isSilent:(BOOL)isSilent
|
|
registrationId:(int)registrationId
|
|
{
|
|
self = [super init];
|
|
|
|
if (!self) {
|
|
return self;
|
|
}
|
|
|
|
_type = type;
|
|
_destination = destination;
|
|
_destinationDeviceId = deviceId;
|
|
_destinationRegistrationId = registrationId;
|
|
_content = [content base64EncodedString];
|
|
_silent = isSilent;
|
|
|
|
return self;
|
|
}
|
|
|
|
@end
|