mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
ccb4a88742
git remote add ssk ../SignalServiceKit git remote update git merge -s ours --allow-unrelated-histories --no-commit ssk/master git read-tree --prefix=SignalServiceKit -u ssk/master git commit
51 lines
1.2 KiB
Objective-C
51 lines
1.2 KiB
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import "OWSUnknownContactBlockOfferMessage.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface OWSUnknownContactBlockOfferMessage ()
|
|
|
|
@property (nonatomic) NSString *contactId;
|
|
|
|
@end
|
|
|
|
#pragma mark -
|
|
|
|
@implementation OWSUnknownContactBlockOfferMessage
|
|
|
|
+ (instancetype)unknownContactBlockOfferMessage:(uint64_t)timestamp
|
|
thread:(TSThread *)thread
|
|
contactId:(NSString *)contactId
|
|
{
|
|
return [[OWSUnknownContactBlockOfferMessage alloc] initWithTimestamp:timestamp thread:thread contactId:contactId];
|
|
}
|
|
|
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp thread:(TSThread *)thread contactId:(NSString *)contactId
|
|
{
|
|
self = [super initWithTimestamp:timestamp inThread:thread failedMessageType:TSErrorMessageUnknownContactBlockOffer];
|
|
|
|
if (self) {
|
|
_contactId = contactId;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
- (BOOL)isDynamicInteraction
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|