|
|
@ -5,6 +5,7 @@
|
|
|
|
#import "OWSEndSessionMessage.h"
|
|
|
|
#import "OWSEndSessionMessage.h"
|
|
|
|
#import "OWSPrimaryStorage+Loki.h"
|
|
|
|
#import "OWSPrimaryStorage+Loki.h"
|
|
|
|
#import "SignalRecipient.h"
|
|
|
|
#import "SignalRecipient.h"
|
|
|
|
|
|
|
|
#import <SessionCoreKit/NSDate+OWS.h>
|
|
|
|
#import <SessionServiceKit/SessionServiceKit-Swift.h>
|
|
|
|
#import <SessionServiceKit/SessionServiceKit-Swift.h>
|
|
|
|
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
@ -31,6 +32,26 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
|
linkPreview:nil];
|
|
|
|
linkPreview:nil];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- (instancetype)initInThread:(nullable TSThread *)thread messageBody:(nullable NSString *)body attachmentId:(nullable NSString *)attachmentId
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
NSMutableArray<NSString *> *attachmentIds = [NSMutableArray new];
|
|
|
|
|
|
|
|
if (attachmentId) {
|
|
|
|
|
|
|
|
[attachmentIds addObject:attachmentId];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return [super initOutgoingMessageWithTimestamp:[NSDate ows_millisecondTimeStamp]
|
|
|
|
|
|
|
|
inThread:thread
|
|
|
|
|
|
|
|
messageBody:body
|
|
|
|
|
|
|
|
attachmentIds:attachmentIds
|
|
|
|
|
|
|
|
expiresInSeconds:0
|
|
|
|
|
|
|
|
expireStartedAt:0
|
|
|
|
|
|
|
|
isVoiceMessage:NO
|
|
|
|
|
|
|
|
groupMetaMessage:TSGroupMetaMessageUnspecified
|
|
|
|
|
|
|
|
quotedMessage:nil
|
|
|
|
|
|
|
|
contactShare:nil
|
|
|
|
|
|
|
|
linkPreview:nil];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (BOOL)shouldBeSaved
|
|
|
|
- (BOOL)shouldBeSaved
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return NO;
|
|
|
|
return NO;
|
|
|
|