Timer info messages *before* the message which changed the timer

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent a9e7c5e879
commit eb140a6839

@ -49,6 +49,13 @@ NS_ASSUME_NONNULL_BEGIN
return self;
}
- (BOOL)shouldUseReceiptDateForSorting
{
// Use the timestamp, not the "received at" timestamp to sort,
// since we're creating these interactions after the fact and back-dating them.
return NO;
}
- (NSString *)description
{
if (self.createdByRemoteName) {

@ -254,16 +254,17 @@ void AssertIsOnDisappearingMessagesQueue()
NSString *contactName = [contactsManager displayNameForPhoneIdentifier:incomingMessage.messageAuthorId];
// We want the info message to appear _before_ the message.
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestamp - 1
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestampForSorting - 1
thread:message.thread
configuration:disappearingMessagesConfiguration
createdByRemoteName:contactName] saveWithTransaction:transaction];
createdByRemoteName:contactName]
saveWithTransaction:transaction];
} else {
// We want the info message to appear _before_ the message.
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestamp - 1
[[[OWSDisappearingConfigurationUpdateInfoMessage alloc] initWithTimestamp:message.timestampForSorting - 1
thread:message.thread
configuration:disappearingMessagesConfiguration]
saveWithTransaction:transaction];
saveWithTransaction:transaction];
}
backgroundTask = nil;

Loading…
Cancel
Save