Merge branch 'charlesmchen/protoUpdates'

pull/1/head
Matthew Chen 7 years ago
commit 94b34e241e

@ -9,6 +9,7 @@ package signalservice;
option java_package = "org.whispersystems.signalservice.internal.push";
option java_outer_classname = "SignalServiceProtos";
// Signal-iOS
import "objectivec-descriptor.proto";
option (google.protobuf.objectivec_file_options).class_prefix = "OWSSignalServiceProtos";
@ -92,6 +93,7 @@ message DataMessage {
optional uint32 flags = 4;
optional uint32 expireTimer = 5;
optional bytes profileKey = 6;
optional uint64 timestamp = 7;
}
message NullMessage {
@ -130,7 +132,8 @@ message SyncMessage {
}
message Contacts {
optional AttachmentPointer blob = 1;
optional AttachmentPointer blob = 1;
// Signal-iOS renamed this property.
optional bool isComplete = 2 [default = false];
}
@ -187,6 +190,8 @@ message AttachmentPointer {
optional bytes digest = 6;
optional string fileName = 7;
optional uint32 flags = 8;
optional uint32 width = 9;
optional uint32 height = 10;
}
message GroupContext {
@ -210,12 +215,14 @@ message ContactDetails {
optional uint32 length = 2;
}
optional string number = 1;
optional string name = 2;
optional Avatar avatar = 3;
optional string color = 4;
optional Verified verified = 5;
optional bytes profileKey = 6;
optional string number = 1;
optional string name = 2;
optional Avatar avatar = 3;
optional string color = 4;
optional Verified verified = 5;
optional bytes profileKey = 6;
optional bool blocked = 7;
optional uint32 expireTimer = 8;
}
message GroupDetails {
@ -224,9 +231,10 @@ message GroupDetails {
optional uint32 length = 2;
}
optional bytes id = 1;
optional string name = 2;
repeated string members = 3;
optional Avatar avatar = 4;
optional bool active = 5 [default = true];
optional bytes id = 1;
optional string name = 2;
repeated string members = 3;
optional Avatar avatar = 4;
optional bool active = 5 [default = true];
optional uint32 expireTimer = 6;
}

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "TSThread.h"
@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
transaction:(YapDatabaseReadWriteTransaction *)transaction
relay:(nullable NSString *)relay;
// Unlike getOrCreateThreadWithContactId, this will _NOT_ create a thread if one does not already exist.
+ (nullable instancetype)getThreadWithContactId:(NSString *)contactId;
- (NSString *)contactIdentifier;
+ (NSString *)contactIdFromThreadId:(NSString *)threadId;

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "TSContactThread.h"
@ -83,6 +83,19 @@ NS_ASSUME_NONNULL_BEGIN
return thread;
}
+ (nullable instancetype)getThreadWithContactId:(NSString *)contactId
{
OWSAssert(contactId.length > 0);
__block TSContactThread *_Nullable thread;
[[self dbReadWriteConnection] readWithBlock:^(YapDatabaseReadTransaction *transaction) {
thread =
[TSContactThread fetchObjectWithUniqueID:[self threadIdFromContactId:contactId] transaction:transaction];
}];
return thread;
}
- (NSString *)contactIdentifier {
return [[self class] contactIdFromThreadId:self.uniqueId];
}

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "TSGroupModel.h"

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "TSGroupThread.h"

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSContactsOutputStream.h"
@ -7,9 +7,12 @@
#import "Cryptography.h"
#import "MIMETypeUtil.h"
#import "NSData+keyVersionByte.h"
#import "OWSBlockingManager.h"
#import "OWSDisappearingMessagesConfiguration.h"
#import "OWSRecipientIdentity.h"
#import "OWSSignalServiceProtos.pb.h"
#import "SignalAccount.h"
#import "TSContactThread.h"
#import <ProtocolBuffers/CodedOutputStream.h>
NS_ASSUME_NONNULL_BEGIN
@ -51,6 +54,20 @@ NS_ASSUME_NONNULL_BEGIN
[contactBuilder setProfileKey:profileKeyData];
}
TSContactThread *_Nullable contactThread = [TSContactThread getThreadWithContactId:signalAccount.recipientId];
if (contactThread) {
OWSDisappearingMessagesConfiguration *_Nullable disappearingMessagesConfiguration =
[OWSDisappearingMessagesConfiguration fetchObjectWithUniqueID:contactThread.uniqueId];
if (disappearingMessagesConfiguration && disappearingMessagesConfiguration.isEnabled) {
[contactBuilder setExpireTimer:disappearingMessagesConfiguration.durationSeconds];
}
}
if ([OWSBlockingManager.sharedManager isRecipientIdBlocked:signalAccount.recipientId]) {
[contactBuilder setBlocked:YES];
}
NSData *contactData = [[contactBuilder build] data];
uint32_t contactDataLength = (uint32_t)contactData.length;

@ -1,14 +1,17 @@
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSChunkedOutputStream.h"
NS_ASSUME_NONNULL_BEGIN
@class TSGroupModel;
@class YapDatabaseReadTransaction;
@interface OWSGroupsOutputStream : OWSChunkedOutputStream
- (void)writeGroup:(TSGroupModel *)group;
- (void)writeGroup:(TSGroupModel *)group transaction:(YapDatabaseReadTransaction *)transaction;
@end

@ -1,17 +1,24 @@
// Copyright © 2016 Open Whisper Systems. All rights reserved.
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSGroupsOutputStream.h"
#import "MIMETypeUtil.h"
#import "OWSDisappearingMessagesConfiguration.h"
#import "OWSSignalServiceProtos.pb.h"
#import "TSGroupModel.h"
#import "TSGroupThread.h"
#import <ProtocolBuffers/CodedOutputStream.h>
NS_ASSUME_NONNULL_BEGIN
@implementation OWSGroupsOutputStream
- (void)writeGroup:(TSGroupModel *)group
- (void)writeGroup:(TSGroupModel *)group transaction:(YapDatabaseReadTransaction *)transaction
{
OWSAssert(group);
OWSAssert(transaction);
OWSSignalServiceProtosGroupDetailsBuilder *groupBuilder = [OWSSignalServiceProtosGroupDetailsBuilder new];
[groupBuilder setId:group.groupId];
[groupBuilder setName:group.groupName];
@ -33,6 +40,16 @@ NS_ASSUME_NONNULL_BEGIN
[self.delegateStream writeRawVarint32:groupDataLength];
[self.delegateStream writeRawData:groupData];
TSGroupThread *_Nullable groupThread = [TSGroupThread threadWithGroupId:group.groupId transaction:transaction];
if (groupThread) {
OWSDisappearingMessagesConfiguration *_Nullable disappearingMessagesConfiguration =
[OWSDisappearingMessagesConfiguration fetchObjectWithUniqueID:groupThread.uniqueId transaction:transaction];
if (disappearingMessagesConfiguration && disappearingMessagesConfiguration.isEnabled) {
[groupBuilder setExpireTimer:disappearingMessagesConfiguration.durationSeconds];
}
}
if (avatarPng) {
[self.delegateStream writeRawData:avatarPng];
}

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "DataSource.h"
@ -53,6 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)deleteAttachments;
+ (NSString *)attachmentsFolder;
- (BOOL)shouldHaveImageSize;
- (CGSize)imageSize;
- (CGFloat)audioDurationSeconds;

@ -19,9 +19,11 @@ NS_ASSUME_NONNULL_BEGIN
// changes in the file path generation logic don't break existing attachments.
@property (nullable, nonatomic) NSString *localRelativeFilePath;
// These properties should only be accessed on the main thread.
// These properties should only be accessed while synchronized on self.
@property (nullable, nonatomic) NSNumber *cachedImageWidth;
@property (nullable, nonatomic) NSNumber *cachedImageHeight;
// This property should only be accessed on the main thread.
@property (nullable, nonatomic) NSNumber *cachedAudioDurationSeconds;
@end
@ -105,8 +107,11 @@ NS_ASSUME_NONNULL_BEGIN
if (attachmentSchemaVersion < 4) {
// Legacy image sizes don't correctly reflect image orientation.
self.cachedImageWidth = nil;
self.cachedImageHeight = nil;
@synchronized(self)
{
self.cachedImageWidth = nil;
self.cachedImageHeight = nil;
}
}
}
@ -390,35 +395,46 @@ NS_ASSUME_NONNULL_BEGIN
}
}
- (BOOL)shouldHaveImageSize
{
return ([self isVideo] || [self isImage] || [self isAnimated]);
}
- (CGSize)imageSize
{
OWSAssertIsOnMainThread();
OWSAssert(self.shouldHaveImageSize);
if (self.cachedImageWidth && self.cachedImageHeight) {
return CGSizeMake(self.cachedImageWidth.floatValue, self.cachedImageHeight.floatValue);
}
@synchronized(self)
{
if (self.cachedImageWidth && self.cachedImageHeight) {
return CGSizeMake(self.cachedImageWidth.floatValue, self.cachedImageHeight.floatValue);
}
CGSize imageSize = [self calculateImageSize];
self.cachedImageWidth = @(imageSize.width);
self.cachedImageHeight = @(imageSize.height);
CGSize imageSize = [self calculateImageSize];
if (imageSize.width <= 0 || imageSize.height <= 0) {
return CGSizeZero;
}
self.cachedImageWidth = @(imageSize.width);
self.cachedImageHeight = @(imageSize.height);
[self.dbReadWriteConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[self.dbReadWriteConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
NSString *collection = [[self class] collection];
TSAttachmentStream *latestInstance = [transaction objectForKey:self.uniqueId inCollection:collection];
if (latestInstance) {
latestInstance.cachedImageWidth = @(imageSize.width);
latestInstance.cachedImageHeight = @(imageSize.height);
[latestInstance saveWithTransaction:transaction];
} else {
// This message has not yet been saved or has been deleted; do nothing.
// This isn't an error per se, but these race conditions should be
// _very_ rare.
OWSFail(@"%@ Attachment not yet saved.", self.logTag);
}
}];
NSString *collection = [[self class] collection];
TSAttachmentStream *latestInstance = [transaction objectForKey:self.uniqueId inCollection:collection];
if (latestInstance) {
latestInstance.cachedImageWidth = @(imageSize.width);
latestInstance.cachedImageHeight = @(imageSize.height);
[latestInstance saveWithTransaction:transaction];
} else {
// This message has not yet been saved or has been deleted; do nothing.
// This isn't an error per se, but these race conditions should be
// _very_ rare.
OWSFail(@"%@ Attachment not yet saved.", self.logTag);
}
}];
return imageSize;
return imageSize;
}
}
- (CGFloat)calculateAudioDurationSeconds

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSSyncGroupsMessage.h"
@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN
return;
}
TSGroupModel *group = ((TSGroupThread *)obj).groupModel;
[groupsOutputStream writeGroup:group];
[groupsOutputStream writeGroup:group transaction:transaction];
}];
[groupsOutputStream flush];

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSSyncGroupsRequestMessage.h"
@ -55,6 +55,7 @@ NS_ASSUME_NONNULL_BEGIN
[groupContextBuilder setId:self.groupId];
OWSSignalServiceProtosDataMessageBuilder *builder = [OWSSignalServiceProtosDataMessageBuilder new];
[builder setTimestamp:self.timestamp];
[builder setGroupBuilder:groupContextBuilder];
return builder;

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSDisappearingMessagesConfigurationMessage.h"
@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
- (OWSSignalServiceProtosDataMessageBuilder *)dataMessageBuilder
{
OWSSignalServiceProtosDataMessageBuilder *dataMessageBuilder = [super dataMessageBuilder];
[dataMessageBuilder setTimestamp:self.timestamp];
[dataMessageBuilder setFlags:OWSSignalServiceProtosDataMessageFlagsExpirationTimerUpdate];
if (self.configuration.isEnabled) {
[dataMessageBuilder setExpireTimer:self.configuration.durationSeconds];

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSEndSessionMessage.h"
@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
- (OWSSignalServiceProtosDataMessageBuilder *)dataMessageBuilder
{
OWSSignalServiceProtosDataMessageBuilder *builder = [super dataMessageBuilder];
[builder setTimestamp:self.timestamp];
[builder setFlags:OWSSignalServiceProtosDataMessageFlagsEndSession];
return builder;

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "TSOutgoingMessage.h"
@ -446,6 +446,7 @@ NSString *const kTSOutgoingMessageSentRecipientAll = @"kTSOutgoingMessageSentRec
{
TSThread *thread = self.thread;
OWSSignalServiceProtosDataMessageBuilder *builder = [OWSSignalServiceProtosDataMessageBuilder new];
[builder setTimestamp:self.timestamp];
[builder setBody:self.body];
BOOL attachmentWasGroupAvatar = NO;
if ([thread isKindOfClass:[TSGroupThread class]]) {
@ -495,6 +496,7 @@ NSString *const kTSOutgoingMessageSentRecipientAll = @"kTSOutgoingMessageSentRec
OWSAssert(self.thread);
OWSSignalServiceProtosDataMessageBuilder *builder = [self dataMessageBuilder];
[builder setTimestamp:self.timestamp];
[builder addLocalProfileKeyIfNecessary:self.thread recipientId:recipientId];
return [builder build];
}
@ -532,6 +534,19 @@ NSString *const kTSOutgoingMessageSentRecipientAll = @"kTSOutgoingMessageSentRec
[builder setKey:attachmentStream.encryptionKey];
[builder setDigest:attachmentStream.digest];
[builder setFlags:(self.isVoiceMessage ? OWSSignalServiceProtosAttachmentPointerFlagsVoiceMessage : 0)];
if ([attachmentStream shouldHaveImageSize]) {
CGSize imageSize = [attachmentStream imageSize];
if (imageSize.width < NSIntegerMax && imageSize.height < NSIntegerMax) {
NSInteger imageWidth = (NSInteger)round(imageSize.width);
NSInteger imageHeight = (NSInteger)round(imageSize.height);
if (imageWidth > 0 && imageHeight > 0) {
[builder setWidth:(UInt32)imageWidth];
[builder setHeight:(UInt32)imageHeight];
}
}
}
return [builder build];
}

@ -312,6 +312,19 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(dataMessage);
OWSAssert(transaction);
if (dataMessage.hasTimestamp) {
if (dataMessage.timestamp <= 0) {
DDLogError(@"%@ Ignoring message with invalid data message timestamp: %@", self.logTag, envelope.source);
return;
}
// This prevents replay attacks by the service.
if (dataMessage.timestamp != envelope.timestamp) {
DDLogError(
@"%@ Ignoring message with non-matching data message timestamp: %@", self.logTag, envelope.source);
return;
}
}
if ([dataMessage hasProfileKey]) {
NSData *profileKey = [dataMessage profileKey];
NSString *recipientId = envelope.source;

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSProfileKeyMessage.h"
@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSAssert(self.thread);
OWSSignalServiceProtosDataMessageBuilder *builder = [self dataMessageBuilder];
[builder setTimestamp:self.timestamp];
[builder addLocalProfileKey];
[builder setFlags:OWSSignalServiceProtosDataMessageFlagsProfileKeyUpdate];

@ -799,13 +799,16 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
#define DataMessage_flags @"flags"
#define DataMessage_expireTimer @"expireTimer"
#define DataMessage_profileKey @"profileKey"
#define DataMessage_timestamp @"timestamp"
@interface OWSSignalServiceProtosDataMessage : PBGeneratedMessage<GeneratedMessageProtocol> {
@private
BOOL hasTimestamp_:1;
BOOL hasBody_:1;
BOOL hasGroup_:1;
BOOL hasProfileKey_:1;
BOOL hasFlags_:1;
BOOL hasExpireTimer_:1;
UInt64 timestamp;
NSString* body;
OWSSignalServiceProtosGroupContext* group;
NSData* profileKey;
@ -818,12 +821,14 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (BOOL) hasFlags;
- (BOOL) hasExpireTimer;
- (BOOL) hasProfileKey;
- (BOOL) hasTimestamp;
@property (readonly, strong) NSString* body;
@property (readonly, strong) NSArray<OWSSignalServiceProtosAttachmentPointer*> * attachments;
@property (readonly, strong) OWSSignalServiceProtosGroupContext* group;
@property (readonly) UInt32 flags;
@property (readonly) UInt32 expireTimer;
@property (readonly, strong) NSData* profileKey;
@property (readonly) UInt64 timestamp;
- (OWSSignalServiceProtosAttachmentPointer*)attachmentsAtIndex:(NSUInteger)index;
+ (instancetype) defaultInstance;
@ -893,6 +898,11 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (NSData*) profileKey;
- (OWSSignalServiceProtosDataMessageBuilder*) setProfileKey:(NSData*) value;
- (OWSSignalServiceProtosDataMessageBuilder*) clearProfileKey;
- (BOOL) hasTimestamp;
- (UInt64) timestamp;
- (OWSSignalServiceProtosDataMessageBuilder*) setTimestamp:(UInt64) value;
- (OWSSignalServiceProtosDataMessageBuilder*) clearTimestamp;
@end
#define NullMessage_padding @"padding"
@ -1644,6 +1654,8 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
#define AttachmentPointer_digest @"digest"
#define AttachmentPointer_fileName @"fileName"
#define AttachmentPointer_flags @"flags"
#define AttachmentPointer_width @"width"
#define AttachmentPointer_height @"height"
@interface OWSSignalServiceProtosAttachmentPointer : PBGeneratedMessage<GeneratedMessageProtocol> {
@private
BOOL hasId_:1;
@ -1654,6 +1666,8 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
BOOL hasDigest_:1;
BOOL hasSize_:1;
BOOL hasFlags_:1;
BOOL hasWidth_:1;
BOOL hasHeight_:1;
UInt64 id;
NSString* contentType;
NSString* fileName;
@ -1662,6 +1676,8 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
NSData* digest;
UInt32 size;
UInt32 flags;
UInt32 width;
UInt32 height;
}
- (BOOL) hasId;
- (BOOL) hasContentType;
@ -1671,6 +1687,8 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (BOOL) hasDigest;
- (BOOL) hasFileName;
- (BOOL) hasFlags;
- (BOOL) hasWidth;
- (BOOL) hasHeight;
@property (readonly) UInt64 id;
@property (readonly, strong) NSString* contentType;
@property (readonly, strong) NSData* key;
@ -1679,6 +1697,8 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
@property (readonly, strong) NSData* digest;
@property (readonly, strong) NSString* fileName;
@property (readonly) UInt32 flags;
@property (readonly) UInt32 width;
@property (readonly) UInt32 height;
+ (instancetype) defaultInstance;
- (instancetype) defaultInstance;
@ -1754,6 +1774,16 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (UInt32) flags;
- (OWSSignalServiceProtosAttachmentPointerBuilder*) setFlags:(UInt32) value;
- (OWSSignalServiceProtosAttachmentPointerBuilder*) clearFlags;
- (BOOL) hasWidth;
- (UInt32) width;
- (OWSSignalServiceProtosAttachmentPointerBuilder*) setWidth:(UInt32) value;
- (OWSSignalServiceProtosAttachmentPointerBuilder*) clearWidth;
- (BOOL) hasHeight;
- (UInt32) height;
- (OWSSignalServiceProtosAttachmentPointerBuilder*) setHeight:(UInt32) value;
- (OWSSignalServiceProtosAttachmentPointerBuilder*) clearHeight;
@end
#define GroupContext_id @"id"
@ -1854,20 +1884,26 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
#define ContactDetails_color @"color"
#define ContactDetails_verified @"verified"
#define ContactDetails_profileKey @"profileKey"
#define ContactDetails_blocked @"blocked"
#define ContactDetails_expireTimer @"expireTimer"
@interface OWSSignalServiceProtosContactDetails : PBGeneratedMessage<GeneratedMessageProtocol> {
@private
BOOL hasBlocked_:1;
BOOL hasNumber_:1;
BOOL hasName_:1;
BOOL hasColor_:1;
BOOL hasAvatar_:1;
BOOL hasVerified_:1;
BOOL hasProfileKey_:1;
BOOL hasExpireTimer_:1;
BOOL blocked_:1;
NSString* number;
NSString* name;
NSString* color;
OWSSignalServiceProtosContactDetailsAvatar* avatar;
OWSSignalServiceProtosVerified* verified;
NSData* profileKey;
UInt32 expireTimer;
}
- (BOOL) hasNumber;
- (BOOL) hasName;
@ -1875,12 +1911,16 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (BOOL) hasColor;
- (BOOL) hasVerified;
- (BOOL) hasProfileKey;
- (BOOL) hasBlocked;
- (BOOL) hasExpireTimer;
@property (readonly, strong) NSString* number;
@property (readonly, strong) NSString* name;
@property (readonly, strong) OWSSignalServiceProtosContactDetailsAvatar* avatar;
@property (readonly, strong) NSString* color;
@property (readonly, strong) OWSSignalServiceProtosVerified* verified;
@property (readonly, strong) NSData* profileKey;
- (BOOL) blocked;
@property (readonly) UInt32 expireTimer;
+ (instancetype) defaultInstance;
- (instancetype) defaultInstance;
@ -2010,6 +2050,16 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (NSData*) profileKey;
- (OWSSignalServiceProtosContactDetailsBuilder*) setProfileKey:(NSData*) value;
- (OWSSignalServiceProtosContactDetailsBuilder*) clearProfileKey;
- (BOOL) hasBlocked;
- (BOOL) blocked;
- (OWSSignalServiceProtosContactDetailsBuilder*) setBlocked:(BOOL) value;
- (OWSSignalServiceProtosContactDetailsBuilder*) clearBlocked;
- (BOOL) hasExpireTimer;
- (UInt32) expireTimer;
- (OWSSignalServiceProtosContactDetailsBuilder*) setExpireTimer:(UInt32) value;
- (OWSSignalServiceProtosContactDetailsBuilder*) clearExpireTimer;
@end
#define GroupDetails_id @"id"
@ -2017,27 +2067,32 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
#define GroupDetails_members @"members"
#define GroupDetails_avatar @"avatar"
#define GroupDetails_active @"active"
#define GroupDetails_expireTimer @"expireTimer"
@interface OWSSignalServiceProtosGroupDetails : PBGeneratedMessage<GeneratedMessageProtocol> {
@private
BOOL hasActive_:1;
BOOL hasName_:1;
BOOL hasAvatar_:1;
BOOL hasId_:1;
BOOL hasExpireTimer_:1;
BOOL active_:1;
NSString* name;
OWSSignalServiceProtosGroupDetailsAvatar* avatar;
NSData* id;
UInt32 expireTimer;
NSMutableArray * membersArray;
}
- (BOOL) hasId;
- (BOOL) hasName;
- (BOOL) hasAvatar;
- (BOOL) hasActive;
- (BOOL) hasExpireTimer;
@property (readonly, strong) NSData* id;
@property (readonly, strong) NSString* name;
@property (readonly, strong) NSArray * members;
@property (readonly, strong) OWSSignalServiceProtosGroupDetailsAvatar* avatar;
- (BOOL) active;
@property (readonly) UInt32 expireTimer;
- (NSString*)membersAtIndex:(NSUInteger)index;
+ (instancetype) defaultInstance;
@ -2162,6 +2217,11 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
- (BOOL) active;
- (OWSSignalServiceProtosGroupDetailsBuilder*) setActive:(BOOL) value;
- (OWSSignalServiceProtosGroupDetailsBuilder*) clearActive;
- (BOOL) hasExpireTimer;
- (UInt32) expireTimer;
- (OWSSignalServiceProtosGroupDetailsBuilder*) setExpireTimer:(UInt32) value;
- (OWSSignalServiceProtosGroupDetailsBuilder*) clearExpireTimer;
@end

@ -2921,6 +2921,7 @@ static OWSSignalServiceProtosCallMessageHangup* defaultOWSSignalServiceProtosCal
@property UInt32 flags;
@property UInt32 expireTimer;
@property (strong) NSData* profileKey;
@property UInt64 timestamp;
@end
@implementation OWSSignalServiceProtosDataMessage
@ -2962,6 +2963,13 @@ static OWSSignalServiceProtosCallMessageHangup* defaultOWSSignalServiceProtosCal
hasProfileKey_ = !!_value_;
}
@synthesize profileKey;
- (BOOL) hasTimestamp {
return !!hasTimestamp_;
}
- (void) setHasTimestamp:(BOOL) _value_ {
hasTimestamp_ = !!_value_;
}
@synthesize timestamp;
- (instancetype) init {
if ((self = [super init])) {
self.body = @"";
@ -2969,6 +2977,7 @@ static OWSSignalServiceProtosCallMessageHangup* defaultOWSSignalServiceProtosCal
self.flags = 0;
self.expireTimer = 0;
self.profileKey = [NSData data];
self.timestamp = 0L;
}
return self;
}
@ -3012,6 +3021,9 @@ static OWSSignalServiceProtosDataMessage* defaultOWSSignalServiceProtosDataMessa
if (self.hasProfileKey) {
[output writeData:6 value:self.profileKey];
}
if (self.hasTimestamp) {
[output writeUInt64:7 value:self.timestamp];
}
[self.unknownFields writeToCodedOutputStream:output];
}
- (SInt32) serializedSize {
@ -3039,6 +3051,9 @@ static OWSSignalServiceProtosDataMessage* defaultOWSSignalServiceProtosDataMessa
if (self.hasProfileKey) {
size_ += computeDataSize(6, self.profileKey);
}
if (self.hasTimestamp) {
size_ += computeUInt64Size(7, self.timestamp);
}
size_ += self.unknownFields.serializedSize;
memoizedSerializedSize = size_;
return size_;
@ -3098,6 +3113,9 @@ static OWSSignalServiceProtosDataMessage* defaultOWSSignalServiceProtosDataMessa
if (self.hasProfileKey) {
[output appendFormat:@"%@%@: %@\n", indent, @"profileKey", self.profileKey];
}
if (self.hasTimestamp) {
[output appendFormat:@"%@%@: %@\n", indent, @"timestamp", [NSNumber numberWithLongLong:self.timestamp]];
}
[self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (void) storeInDictionary:(NSMutableDictionary *)dictionary {
@ -3123,6 +3141,9 @@ static OWSSignalServiceProtosDataMessage* defaultOWSSignalServiceProtosDataMessa
if (self.hasProfileKey) {
[dictionary setObject: self.profileKey forKey: @"profileKey"];
}
if (self.hasTimestamp) {
[dictionary setObject: [NSNumber numberWithLongLong:self.timestamp] forKey: @"timestamp"];
}
[self.unknownFields storeInDictionary:dictionary];
}
- (BOOL) isEqual:(id)other {
@ -3145,6 +3166,8 @@ static OWSSignalServiceProtosDataMessage* defaultOWSSignalServiceProtosDataMessa
(!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) &&
self.hasProfileKey == otherMessage.hasProfileKey &&
(!self.hasProfileKey || [self.profileKey isEqual:otherMessage.profileKey]) &&
self.hasTimestamp == otherMessage.hasTimestamp &&
(!self.hasTimestamp || self.timestamp == otherMessage.timestamp) &&
(self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
@ -3167,6 +3190,9 @@ static OWSSignalServiceProtosDataMessage* defaultOWSSignalServiceProtosDataMessa
if (self.hasProfileKey) {
hashCode = hashCode * 31 + [self.profileKey hash];
}
if (self.hasTimestamp) {
hashCode = hashCode * 31 + [[NSNumber numberWithLongLong:self.timestamp] hash];
}
hashCode = hashCode * 31 + [self.unknownFields hash];
return hashCode;
}
@ -3255,6 +3281,9 @@ NSString *NSStringFromOWSSignalServiceProtosDataMessageFlags(OWSSignalServicePro
if (other.hasProfileKey) {
[self setProfileKey:other.profileKey];
}
if (other.hasTimestamp) {
[self setTimestamp:other.timestamp];
}
[self mergeUnknownFields:other.unknownFields];
return self;
}
@ -3307,6 +3336,10 @@ NSString *NSStringFromOWSSignalServiceProtosDataMessageFlags(OWSSignalServicePro
[self setProfileKey:[input readData]];
break;
}
case 56: {
[self setTimestamp:[input readUInt64]];
break;
}
}
}
}
@ -3425,6 +3458,22 @@ NSString *NSStringFromOWSSignalServiceProtosDataMessageFlags(OWSSignalServicePro
resultDataMessage.profileKey = [NSData data];
return self;
}
- (BOOL) hasTimestamp {
return resultDataMessage.hasTimestamp;
}
- (UInt64) timestamp {
return resultDataMessage.timestamp;
}
- (OWSSignalServiceProtosDataMessageBuilder*) setTimestamp:(UInt64) value {
resultDataMessage.hasTimestamp = YES;
resultDataMessage.timestamp = value;
return self;
}
- (OWSSignalServiceProtosDataMessageBuilder*) clearTimestamp {
resultDataMessage.hasTimestamp = NO;
resultDataMessage.timestamp = 0L;
return self;
}
@end
@interface OWSSignalServiceProtosNullMessage ()
@ -6925,6 +6974,8 @@ static OWSSignalServiceProtosSyncMessageConfiguration* defaultOWSSignalServicePr
@property (strong) NSData* digest;
@property (strong) NSString* fileName;
@property UInt32 flags;
@property UInt32 width;
@property UInt32 height;
@end
@implementation OWSSignalServiceProtosAttachmentPointer
@ -6985,6 +7036,20 @@ static OWSSignalServiceProtosSyncMessageConfiguration* defaultOWSSignalServicePr
hasFlags_ = !!_value_;
}
@synthesize flags;
- (BOOL) hasWidth {
return !!hasWidth_;
}
- (void) setHasWidth:(BOOL) _value_ {
hasWidth_ = !!_value_;
}
@synthesize width;
- (BOOL) hasHeight {
return !!hasHeight_;
}
- (void) setHasHeight:(BOOL) _value_ {
hasHeight_ = !!_value_;
}
@synthesize height;
- (instancetype) init {
if ((self = [super init])) {
self.id = 0L;
@ -6995,6 +7060,8 @@ static OWSSignalServiceProtosSyncMessageConfiguration* defaultOWSSignalServicePr
self.digest = [NSData data];
self.fileName = @"";
self.flags = 0;
self.width = 0;
self.height = 0;
}
return self;
}
@ -7038,6 +7105,12 @@ static OWSSignalServiceProtosAttachmentPointer* defaultOWSSignalServiceProtosAtt
if (self.hasFlags) {
[output writeUInt32:8 value:self.flags];
}
if (self.hasWidth) {
[output writeUInt32:9 value:self.width];
}
if (self.hasHeight) {
[output writeUInt32:10 value:self.height];
}
[self.unknownFields writeToCodedOutputStream:output];
}
- (SInt32) serializedSize {
@ -7071,6 +7144,12 @@ static OWSSignalServiceProtosAttachmentPointer* defaultOWSSignalServiceProtosAtt
if (self.hasFlags) {
size_ += computeUInt32Size(8, self.flags);
}
if (self.hasWidth) {
size_ += computeUInt32Size(9, self.width);
}
if (self.hasHeight) {
size_ += computeUInt32Size(10, self.height);
}
size_ += self.unknownFields.serializedSize;
memoizedSerializedSize = size_;
return size_;
@ -7130,6 +7209,12 @@ static OWSSignalServiceProtosAttachmentPointer* defaultOWSSignalServiceProtosAtt
if (self.hasFlags) {
[output appendFormat:@"%@%@: %@\n", indent, @"flags", [NSNumber numberWithInteger:self.flags]];
}
if (self.hasWidth) {
[output appendFormat:@"%@%@: %@\n", indent, @"width", [NSNumber numberWithInteger:self.width]];
}
if (self.hasHeight) {
[output appendFormat:@"%@%@: %@\n", indent, @"height", [NSNumber numberWithInteger:self.height]];
}
[self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (void) storeInDictionary:(NSMutableDictionary *)dictionary {
@ -7157,6 +7242,12 @@ static OWSSignalServiceProtosAttachmentPointer* defaultOWSSignalServiceProtosAtt
if (self.hasFlags) {
[dictionary setObject: [NSNumber numberWithInteger:self.flags] forKey: @"flags"];
}
if (self.hasWidth) {
[dictionary setObject: [NSNumber numberWithInteger:self.width] forKey: @"width"];
}
if (self.hasHeight) {
[dictionary setObject: [NSNumber numberWithInteger:self.height] forKey: @"height"];
}
[self.unknownFields storeInDictionary:dictionary];
}
- (BOOL) isEqual:(id)other {
@ -7184,6 +7275,10 @@ static OWSSignalServiceProtosAttachmentPointer* defaultOWSSignalServiceProtosAtt
(!self.hasFileName || [self.fileName isEqual:otherMessage.fileName]) &&
self.hasFlags == otherMessage.hasFlags &&
(!self.hasFlags || self.flags == otherMessage.flags) &&
self.hasWidth == otherMessage.hasWidth &&
(!self.hasWidth || self.width == otherMessage.width) &&
self.hasHeight == otherMessage.hasHeight &&
(!self.hasHeight || self.height == otherMessage.height) &&
(self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
@ -7212,6 +7307,12 @@ static OWSSignalServiceProtosAttachmentPointer* defaultOWSSignalServiceProtosAtt
if (self.hasFlags) {
hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.flags] hash];
}
if (self.hasWidth) {
hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.width] hash];
}
if (self.hasHeight) {
hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.height] hash];
}
hashCode = hashCode * 31 + [self.unknownFields hash];
return hashCode;
}
@ -7296,6 +7397,12 @@ NSString *NSStringFromOWSSignalServiceProtosAttachmentPointerFlags(OWSSignalServ
if (other.hasFlags) {
[self setFlags:other.flags];
}
if (other.hasWidth) {
[self setWidth:other.width];
}
if (other.hasHeight) {
[self setHeight:other.height];
}
[self mergeUnknownFields:other.unknownFields];
return self;
}
@ -7349,6 +7456,14 @@ NSString *NSStringFromOWSSignalServiceProtosAttachmentPointerFlags(OWSSignalServ
[self setFlags:[input readUInt32]];
break;
}
case 72: {
[self setWidth:[input readUInt32]];
break;
}
case 80: {
[self setHeight:[input readUInt32]];
break;
}
}
}
}
@ -7480,6 +7595,38 @@ NSString *NSStringFromOWSSignalServiceProtosAttachmentPointerFlags(OWSSignalServ
resultAttachmentPointer.flags = 0;
return self;
}
- (BOOL) hasWidth {
return resultAttachmentPointer.hasWidth;
}
- (UInt32) width {
return resultAttachmentPointer.width;
}
- (OWSSignalServiceProtosAttachmentPointerBuilder*) setWidth:(UInt32) value {
resultAttachmentPointer.hasWidth = YES;
resultAttachmentPointer.width = value;
return self;
}
- (OWSSignalServiceProtosAttachmentPointerBuilder*) clearWidth {
resultAttachmentPointer.hasWidth = NO;
resultAttachmentPointer.width = 0;
return self;
}
- (BOOL) hasHeight {
return resultAttachmentPointer.hasHeight;
}
- (UInt32) height {
return resultAttachmentPointer.height;
}
- (OWSSignalServiceProtosAttachmentPointerBuilder*) setHeight:(UInt32) value {
resultAttachmentPointer.hasHeight = YES;
resultAttachmentPointer.height = value;
return self;
}
- (OWSSignalServiceProtosAttachmentPointerBuilder*) clearHeight {
resultAttachmentPointer.hasHeight = NO;
resultAttachmentPointer.height = 0;
return self;
}
@end
@interface OWSSignalServiceProtosGroupContext ()
@ -7961,6 +8108,8 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
@property (strong) NSString* color;
@property (strong) OWSSignalServiceProtosVerified* verified;
@property (strong) NSData* profileKey;
@property BOOL blocked;
@property UInt32 expireTimer;
@end
@implementation OWSSignalServiceProtosContactDetails
@ -8007,6 +8156,25 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
hasProfileKey_ = !!_value_;
}
@synthesize profileKey;
- (BOOL) hasBlocked {
return !!hasBlocked_;
}
- (void) setHasBlocked:(BOOL) _value_ {
hasBlocked_ = !!_value_;
}
- (BOOL) blocked {
return !!blocked_;
}
- (void) setBlocked:(BOOL) _value_ {
blocked_ = !!_value_;
}
- (BOOL) hasExpireTimer {
return !!hasExpireTimer_;
}
- (void) setHasExpireTimer:(BOOL) _value_ {
hasExpireTimer_ = !!_value_;
}
@synthesize expireTimer;
- (instancetype) init {
if ((self = [super init])) {
self.number = @"";
@ -8015,6 +8183,8 @@ NSString *NSStringFromOWSSignalServiceProtosGroupContextType(OWSSignalServicePro
self.color = @"";
self.verified = [OWSSignalServiceProtosVerified defaultInstance];
self.profileKey = [NSData data];
self.blocked = NO;
self.expireTimer = 0;
}
return self;
}
@ -8052,6 +8222,12 @@ static OWSSignalServiceProtosContactDetails* defaultOWSSignalServiceProtosContac
if (self.hasProfileKey) {
[output writeData:6 value:self.profileKey];
}
if (self.hasBlocked) {
[output writeBool:7 value:self.blocked];
}
if (self.hasExpireTimer) {
[output writeUInt32:8 value:self.expireTimer];
}
[self.unknownFields writeToCodedOutputStream:output];
}
- (SInt32) serializedSize {
@ -8079,6 +8255,12 @@ static OWSSignalServiceProtosContactDetails* defaultOWSSignalServiceProtosContac
if (self.hasProfileKey) {
size_ += computeDataSize(6, self.profileKey);
}
if (self.hasBlocked) {
size_ += computeBoolSize(7, self.blocked);
}
if (self.hasExpireTimer) {
size_ += computeUInt32Size(8, self.expireTimer);
}
size_ += self.unknownFields.serializedSize;
memoizedSerializedSize = size_;
return size_;
@ -8138,6 +8320,12 @@ static OWSSignalServiceProtosContactDetails* defaultOWSSignalServiceProtosContac
if (self.hasProfileKey) {
[output appendFormat:@"%@%@: %@\n", indent, @"profileKey", self.profileKey];
}
if (self.hasBlocked) {
[output appendFormat:@"%@%@: %@\n", indent, @"blocked", [NSNumber numberWithBool:self.blocked]];
}
if (self.hasExpireTimer) {
[output appendFormat:@"%@%@: %@\n", indent, @"expireTimer", [NSNumber numberWithInteger:self.expireTimer]];
}
[self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (void) storeInDictionary:(NSMutableDictionary *)dictionary {
@ -8163,6 +8351,12 @@ static OWSSignalServiceProtosContactDetails* defaultOWSSignalServiceProtosContac
if (self.hasProfileKey) {
[dictionary setObject: self.profileKey forKey: @"profileKey"];
}
if (self.hasBlocked) {
[dictionary setObject: [NSNumber numberWithBool:self.blocked] forKey: @"blocked"];
}
if (self.hasExpireTimer) {
[dictionary setObject: [NSNumber numberWithInteger:self.expireTimer] forKey: @"expireTimer"];
}
[self.unknownFields storeInDictionary:dictionary];
}
- (BOOL) isEqual:(id)other {
@ -8186,6 +8380,10 @@ static OWSSignalServiceProtosContactDetails* defaultOWSSignalServiceProtosContac
(!self.hasVerified || [self.verified isEqual:otherMessage.verified]) &&
self.hasProfileKey == otherMessage.hasProfileKey &&
(!self.hasProfileKey || [self.profileKey isEqual:otherMessage.profileKey]) &&
self.hasBlocked == otherMessage.hasBlocked &&
(!self.hasBlocked || self.blocked == otherMessage.blocked) &&
self.hasExpireTimer == otherMessage.hasExpireTimer &&
(!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) &&
(self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
@ -8208,6 +8406,12 @@ static OWSSignalServiceProtosContactDetails* defaultOWSSignalServiceProtosContac
if (self.hasProfileKey) {
hashCode = hashCode * 31 + [self.profileKey hash];
}
if (self.hasBlocked) {
hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.blocked] hash];
}
if (self.hasExpireTimer) {
hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.expireTimer] hash];
}
hashCode = hashCode * 31 + [self.unknownFields hash];
return hashCode;
}
@ -8524,6 +8728,12 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
if (other.hasProfileKey) {
[self setProfileKey:other.profileKey];
}
if (other.hasBlocked) {
[self setBlocked:other.blocked];
}
if (other.hasExpireTimer) {
[self setExpireTimer:other.expireTimer];
}
[self mergeUnknownFields:other.unknownFields];
return self;
}
@ -8579,6 +8789,14 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
[self setProfileKey:[input readData]];
break;
}
case 56: {
[self setBlocked:[input readBool]];
break;
}
case 64: {
[self setExpireTimer:[input readUInt32]];
break;
}
}
}
}
@ -8706,6 +8924,38 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
resultContactDetails.profileKey = [NSData data];
return self;
}
- (BOOL) hasBlocked {
return resultContactDetails.hasBlocked;
}
- (BOOL) blocked {
return resultContactDetails.blocked;
}
- (OWSSignalServiceProtosContactDetailsBuilder*) setBlocked:(BOOL) value {
resultContactDetails.hasBlocked = YES;
resultContactDetails.blocked = value;
return self;
}
- (OWSSignalServiceProtosContactDetailsBuilder*) clearBlocked {
resultContactDetails.hasBlocked = NO;
resultContactDetails.blocked = NO;
return self;
}
- (BOOL) hasExpireTimer {
return resultContactDetails.hasExpireTimer;
}
- (UInt32) expireTimer {
return resultContactDetails.expireTimer;
}
- (OWSSignalServiceProtosContactDetailsBuilder*) setExpireTimer:(UInt32) value {
resultContactDetails.hasExpireTimer = YES;
resultContactDetails.expireTimer = value;
return self;
}
- (OWSSignalServiceProtosContactDetailsBuilder*) clearExpireTimer {
resultContactDetails.hasExpireTimer = NO;
resultContactDetails.expireTimer = 0;
return self;
}
@end
@interface OWSSignalServiceProtosGroupDetails ()
@ -8714,6 +8964,7 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
@property (strong) NSMutableArray * membersArray;
@property (strong) OWSSignalServiceProtosGroupDetailsAvatar* avatar;
@property BOOL active;
@property UInt32 expireTimer;
@end
@implementation OWSSignalServiceProtosGroupDetails
@ -8753,12 +9004,20 @@ static OWSSignalServiceProtosContactDetailsAvatar* defaultOWSSignalServiceProtos
- (void) setActive:(BOOL) _value_ {
active_ = !!_value_;
}
- (BOOL) hasExpireTimer {
return !!hasExpireTimer_;
}
- (void) setHasExpireTimer:(BOOL) _value_ {
hasExpireTimer_ = !!_value_;
}
@synthesize expireTimer;
- (instancetype) init {
if ((self = [super init])) {
self.id = [NSData data];
self.name = @"";
self.avatar = [OWSSignalServiceProtosGroupDetailsAvatar defaultInstance];
self.active = YES;
self.expireTimer = 0;
}
return self;
}
@ -8799,6 +9058,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasActive) {
[output writeBool:5 value:self.active];
}
if (self.hasExpireTimer) {
[output writeUInt32:6 value:self.expireTimer];
}
[self.unknownFields writeToCodedOutputStream:output];
}
- (SInt32) serializedSize {
@ -8829,6 +9091,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasActive) {
size_ += computeBoolSize(5, self.active);
}
if (self.hasExpireTimer) {
size_ += computeUInt32Size(6, self.expireTimer);
}
size_ += self.unknownFields.serializedSize;
memoizedSerializedSize = size_;
return size_;
@ -8882,6 +9147,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasActive) {
[output appendFormat:@"%@%@: %@\n", indent, @"active", [NSNumber numberWithBool:self.active]];
}
if (self.hasExpireTimer) {
[output appendFormat:@"%@%@: %@\n", indent, @"expireTimer", [NSNumber numberWithInteger:self.expireTimer]];
}
[self.unknownFields writeDescriptionTo:output withIndent:indent];
}
- (void) storeInDictionary:(NSMutableDictionary *)dictionary {
@ -8900,6 +9168,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasActive) {
[dictionary setObject: [NSNumber numberWithBool:self.active] forKey: @"active"];
}
if (self.hasExpireTimer) {
[dictionary setObject: [NSNumber numberWithInteger:self.expireTimer] forKey: @"expireTimer"];
}
[self.unknownFields storeInDictionary:dictionary];
}
- (BOOL) isEqual:(id)other {
@ -8920,6 +9191,8 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
(!self.hasAvatar || [self.avatar isEqual:otherMessage.avatar]) &&
self.hasActive == otherMessage.hasActive &&
(!self.hasActive || self.active == otherMessage.active) &&
self.hasExpireTimer == otherMessage.hasExpireTimer &&
(!self.hasExpireTimer || self.expireTimer == otherMessage.expireTimer) &&
(self.unknownFields == otherMessage.unknownFields || (self.unknownFields != nil && [self.unknownFields isEqual:otherMessage.unknownFields]));
}
- (NSUInteger) hash {
@ -8939,6 +9212,9 @@ static OWSSignalServiceProtosGroupDetails* defaultOWSSignalServiceProtosGroupDet
if (self.hasActive) {
hashCode = hashCode * 31 + [[NSNumber numberWithBool:self.active] hash];
}
if (self.hasExpireTimer) {
hashCode = hashCode * 31 + [[NSNumber numberWithInteger:self.expireTimer] hash];
}
hashCode = hashCode * 31 + [self.unknownFields hash];
return hashCode;
}
@ -9256,6 +9532,9 @@ static OWSSignalServiceProtosGroupDetailsAvatar* defaultOWSSignalServiceProtosGr
if (other.hasActive) {
[self setActive:other.active];
}
if (other.hasExpireTimer) {
[self setExpireTimer:other.expireTimer];
}
[self mergeUnknownFields:other.unknownFields];
return self;
}
@ -9302,6 +9581,10 @@ static OWSSignalServiceProtosGroupDetailsAvatar* defaultOWSSignalServiceProtosGr
[self setActive:[input readBool]];
break;
}
case 48: {
[self setExpireTimer:[input readUInt32]];
break;
}
}
}
}
@ -9404,6 +9687,22 @@ static OWSSignalServiceProtosGroupDetailsAvatar* defaultOWSSignalServiceProtosGr
resultGroupDetails.active = YES;
return self;
}
- (BOOL) hasExpireTimer {
return resultGroupDetails.hasExpireTimer;
}
- (UInt32) expireTimer {
return resultGroupDetails.expireTimer;
}
- (OWSSignalServiceProtosGroupDetailsBuilder*) setExpireTimer:(UInt32) value {
resultGroupDetails.hasExpireTimer = YES;
resultGroupDetails.expireTimer = value;
return self;
}
- (OWSSignalServiceProtosGroupDetailsBuilder*) clearExpireTimer {
resultGroupDetails.hasExpireTimer = NO;
resultGroupDetails.expireTimer = 0;
return self;
}
@end

Loading…
Cancel
Save