mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Set the timestamp property on data messages.
This commit is contained in:
parent
4218af13d5
commit
59ff1561f5
5 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue