mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.1 KiB
Matlab
50 lines
1.1 KiB
Matlab
|
9 years ago
|
//
|
||
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import "OWSAddToContactsOfferMessage.h"
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
|
||
|
|
@interface OWSAddToContactsOfferMessage ()
|
||
|
|
|
||
|
|
@property (nonatomic) NSString *contactId;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
#pragma mark -
|
||
|
|
|
||
|
|
@implementation OWSAddToContactsOfferMessage
|
||
|
|
|
||
|
|
+ (instancetype)addToContactsOfferMessage:(uint64_t)timestamp thread:(TSThread *)thread contactId:(NSString *)contactId
|
||
|
|
{
|
||
|
|
return [[OWSAddToContactsOfferMessage alloc] initWithTimestamp:timestamp thread:thread contactId:contactId];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (instancetype)initWithTimestamp:(uint64_t)timestamp thread:(TSThread *)thread contactId:(NSString *)contactId
|
||
|
|
{
|
||
|
|
self = [super initWithTimestamp:timestamp inThread:thread messageType:TSInfoMessageAddToContactsOffer];
|
||
|
|
|
||
|
|
if (self) {
|
||
|
|
_contactId = contactId;
|
||
|
|
}
|
||
|
|
|
||
|
|
return self;
|
||
|
|
}
|
||
|
|
|
||
|
9 years ago
|
- (BOOL)shouldUseReceiptDateForSorting
|
||
|
9 years ago
|
{
|
||
|
9 years ago
|
// 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;
|
||
|
9 years ago
|
}
|
||
|
|
|
||
|
9 years ago
|
- (BOOL)isDynamicInteraction
|
||
|
|
{
|
||
|
|
return YES;
|
||
|
|
}
|
||
|
|
|
||
|
9 years ago
|
@end
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_END
|