diff --git a/SignalServiceKit/protobuf/OWSSignalServiceProtos.proto b/SignalServiceKit/protobuf/OWSSignalServiceProtos.proto index 9124a1f9f..ab87cbf65 100644 --- a/SignalServiceKit/protobuf/OWSSignalServiceProtos.proto +++ b/SignalServiceKit/protobuf/OWSSignalServiceProtos.proto @@ -35,6 +35,7 @@ message Content { optional SyncMessage syncMessage = 2; optional CallMessage callMessage = 3; optional NullMessage nullMessage = 4; + optional string profileKey = 5; } message NullMessage { diff --git a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.h b/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.h index 03a6cc996..a7830d9e3 100644 --- a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.h +++ b/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.h @@ -1,6 +1,4 @@ -// -// Copyright (c) 2017 Open Whisper Systems. All rights reserved. -// +// Generated by the protocol buffer compiler. DO NOT EDIT! #import @@ -277,12 +275,15 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro #define Content_syncMessage @"syncMessage" #define Content_callMessage @"callMessage" #define Content_nullMessage @"nullMessage" +#define Content_profileKey @"profileKey" @interface OWSSignalServiceProtosContent : PBGeneratedMessage { @private + BOOL hasProfileKey_:1; BOOL hasDataMessage_:1; BOOL hasSyncMessage_:1; BOOL hasCallMessage_:1; BOOL hasNullMessage_:1; + NSString* profileKey; OWSSignalServiceProtosDataMessage* dataMessage; OWSSignalServiceProtosSyncMessage* syncMessage; OWSSignalServiceProtosCallMessage* callMessage; @@ -292,10 +293,12 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro - (BOOL) hasSyncMessage; - (BOOL) hasCallMessage; - (BOOL) hasNullMessage; +- (BOOL) hasProfileKey; @property (readonly, strong) OWSSignalServiceProtosDataMessage* dataMessage; @property (readonly, strong) OWSSignalServiceProtosSyncMessage* syncMessage; @property (readonly, strong) OWSSignalServiceProtosCallMessage* callMessage; @property (readonly, strong) OWSSignalServiceProtosNullMessage* nullMessage; +@property (readonly, strong) NSString* profileKey; + (instancetype) defaultInstance; - (instancetype) defaultInstance; @@ -359,6 +362,11 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro - (OWSSignalServiceProtosContentBuilder*) setNullMessageBuilder:(OWSSignalServiceProtosNullMessageBuilder*) builderForValue; - (OWSSignalServiceProtosContentBuilder*) mergeNullMessage:(OWSSignalServiceProtosNullMessage*) value; - (OWSSignalServiceProtosContentBuilder*) clearNullMessage; + +- (BOOL) hasProfileKey; +- (NSString*) profileKey; +- (OWSSignalServiceProtosContentBuilder*) setProfileKey:(NSString*) value; +- (OWSSignalServiceProtosContentBuilder*) clearProfileKey; @end #define NullMessage_padding @"padding" diff --git a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.m b/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.m index e0d67382b..44af13083 100644 --- a/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.m +++ b/SignalServiceKit/src/Messages/OWSSignalServiceProtos.pb.m @@ -1,6 +1,4 @@ -// -// Copyright (c) 2017 Open Whisper Systems. All rights reserved. -// +// Generated by the protocol buffer compiler. DO NOT EDIT! #import "OWSSignalServiceProtos.pb.h" // @@protoc_insertion_point(imports) @@ -562,6 +560,7 @@ NSString *NSStringFromOWSSignalServiceProtosEnvelopeType(OWSSignalServiceProtosE @property (strong) OWSSignalServiceProtosSyncMessage* syncMessage; @property (strong) OWSSignalServiceProtosCallMessage* callMessage; @property (strong) OWSSignalServiceProtosNullMessage* nullMessage; +@property (strong) NSString* profileKey; @end @implementation OWSSignalServiceProtosContent @@ -594,12 +593,20 @@ NSString *NSStringFromOWSSignalServiceProtosEnvelopeType(OWSSignalServiceProtosE hasNullMessage_ = !!_value_; } @synthesize nullMessage; +- (BOOL) hasProfileKey { + return !!hasProfileKey_; +} +- (void) setHasProfileKey:(BOOL) _value_ { + hasProfileKey_ = !!_value_; +} +@synthesize profileKey; - (instancetype) init { if ((self = [super init])) { self.dataMessage = [OWSSignalServiceProtosDataMessage defaultInstance]; self.syncMessage = [OWSSignalServiceProtosSyncMessage defaultInstance]; self.callMessage = [OWSSignalServiceProtosCallMessage defaultInstance]; self.nullMessage = [OWSSignalServiceProtosNullMessage defaultInstance]; + self.profileKey = @""; } return self; } @@ -631,6 +638,9 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan if (self.hasNullMessage) { [output writeMessage:4 value:self.nullMessage]; } + if (self.hasProfileKey) { + [output writeString:5 value:self.profileKey]; + } [self.unknownFields writeToCodedOutputStream:output]; } - (SInt32) serializedSize { @@ -652,6 +662,9 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan if (self.hasNullMessage) { size_ += computeMessageSize(4, self.nullMessage); } + if (self.hasProfileKey) { + size_ += computeStringSize(5, self.profileKey); + } size_ += self.unknownFields.serializedSize; memoizedSerializedSize = size_; return size_; @@ -711,6 +724,9 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan withIndent:[NSString stringWithFormat:@"%@ ", indent]]; [output appendFormat:@"%@}\n", indent]; } + if (self.hasProfileKey) { + [output appendFormat:@"%@%@: %@\n", indent, @"profileKey", self.profileKey]; + } [self.unknownFields writeDescriptionTo:output withIndent:indent]; } - (void) storeInDictionary:(NSMutableDictionary *)dictionary { @@ -734,6 +750,9 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan [self.nullMessage storeInDictionary:messageDictionary]; [dictionary setObject:[NSDictionary dictionaryWithDictionary:messageDictionary] forKey:@"nullMessage"]; } + if (self.hasProfileKey) { + [dictionary setObject: self.profileKey forKey: @"profileKey"]; + } [self.unknownFields storeInDictionary:dictionary]; } - (BOOL) isEqual:(id)other { @@ -753,6 +772,8 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan (!self.hasCallMessage || [self.callMessage isEqual:otherMessage.callMessage]) && self.hasNullMessage == otherMessage.hasNullMessage && (!self.hasNullMessage || [self.nullMessage isEqual:otherMessage.nullMessage]) && + self.hasProfileKey == otherMessage.hasProfileKey && + (!self.hasProfileKey || [self.profileKey isEqual:otherMessage.profileKey]) && (self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields])); } - (NSUInteger) hash { @@ -769,6 +790,9 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan if (self.hasNullMessage) { hashCode = hashCode * 31 + [self.nullMessage hash]; } + if (self.hasProfileKey) { + hashCode = hashCode * 31 + [self.profileKey hash]; + } hashCode = hashCode * 31 + [self.unknownFields hash]; return hashCode; } @@ -824,6 +848,9 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan if (other.hasNullMessage) { [self mergeNullMessage:other.nullMessage]; } + if (other.hasProfileKey) { + [self setProfileKey:other.profileKey]; + } [self mergeUnknownFields:other.unknownFields]; return self; } @@ -881,6 +908,10 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan [self setNullMessage:[subBuilder buildPartial]]; break; } + case 42: { + [self setProfileKey:[input readString]]; + break; + } } } } @@ -1004,6 +1035,22 @@ static OWSSignalServiceProtosContent* defaultOWSSignalServiceProtosContentInstan resultContent.nullMessage = [OWSSignalServiceProtosNullMessage defaultInstance]; return self; } +- (BOOL) hasProfileKey { + return resultContent.hasProfileKey; +} +- (NSString*) profileKey { + return resultContent.profileKey; +} +- (OWSSignalServiceProtosContentBuilder*) setProfileKey:(NSString*) value { + resultContent.hasProfileKey = YES; + resultContent.profileKey = value; + return self; +} +- (OWSSignalServiceProtosContentBuilder*) clearProfileKey { + resultContent.hasProfileKey = NO; + resultContent.profileKey = @""; + return self; +} @end @interface OWSSignalServiceProtosNullMessage ()