|
|
|
@ -1,9 +1,13 @@
|
|
|
|
|
// 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
|
|
|
|
@ -33,6 +37,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
[self.delegateStream writeRawVarint32:groupDataLength];
|
|
|
|
|
[self.delegateStream writeRawData:groupData];
|
|
|
|
|
|
|
|
|
|
TSGroupThread *_Nullable groupThread = [TSGroupThread threadWithGroupId:group.groupId];
|
|
|
|
|
if (groupThread) {
|
|
|
|
|
OWSDisappearingMessagesConfiguration *_Nullable disappearingMessagesConfiguration =
|
|
|
|
|
[OWSDisappearingMessagesConfiguration fetchObjectWithUniqueID:groupThread.uniqueId];
|
|
|
|
|
|
|
|
|
|
if (disappearingMessagesConfiguration && disappearingMessagesConfiguration.isEnabled) {
|
|
|
|
|
[groupBuilder setExpireTimer:disappearingMessagesConfiguration.durationSeconds];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (avatarPng) {
|
|
|
|
|
[self.delegateStream writeRawData:avatarPng];
|
|
|
|
|
}
|
|
|
|
|