2017-08-03 23:43:21 +02:00
|
|
|
//
|
2018-09-28 01:40:51 +02:00
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
2017-08-03 23:43:21 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
#import "OWSAddToProfileWhitelistOfferMessage.h"
|
|
|
|
#import "TSThread.h"
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
@implementation OWSAddToProfileWhitelistOfferMessage
|
|
|
|
|
2018-09-28 01:40:51 +02:00
|
|
|
+ (instancetype)addToProfileWhitelistOfferMessage:(uint64_t)timestamp thread:(TSThread *)thread
|
2017-08-03 23:43:21 +02:00
|
|
|
{
|
|
|
|
return [[OWSAddToProfileWhitelistOfferMessage alloc]
|
2018-09-20 22:10:35 +02:00
|
|
|
initWithTimestamp:timestamp
|
|
|
|
inThread:thread
|
|
|
|
messageType:(thread.isGroupThread ? TSInfoMessageAddGroupToProfileWhitelistOffer
|
|
|
|
: TSInfoMessageAddUserToProfileWhitelistOffer)];
|
2017-08-03 23:43:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
- (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;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (BOOL)isDynamicInteraction
|
|
|
|
{
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|