You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
session-ios/SignalServiceKit/src/Messages/OWSMessageServiceParams.m

37 lines
890 B
Matlab

// 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