Debug
This commit is contained in:
parent
37f0dbd5b8
commit
6b7b158000
|
@ -429,9 +429,8 @@ static NSTimeInterval launchStartedAt;
|
|||
|
||||
if (CurrentAppContext().isMainApp) {
|
||||
[SNJobQueue.shared resumePendingJobs];
|
||||
[self syncConfigurationIfNeeded];
|
||||
}
|
||||
|
||||
[self syncConfigurationIfNeeded];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,10 @@ extension Storage {
|
|||
let thread = TSThread.fetch(uniqueId: threadID, transaction: transaction) else { return nil }
|
||||
let tsMessage: TSMessage
|
||||
if message.sender == getUserPublicKey() {
|
||||
tsMessage = TSOutgoingMessage.from(message, associatedWith: thread, using: transaction)
|
||||
guard let syncTarget = message.syncTarget else { return nil }
|
||||
let tsOutgoingMessage = TSOutgoingMessage.from(message, associatedWith: thread, using: transaction)
|
||||
tsOutgoingMessage.update(withSentRecipient: syncTarget, wasSentByUD: true, transaction: transaction)
|
||||
tsMessage = tsOutgoingMessage
|
||||
} else {
|
||||
tsMessage = TSIncomingMessage.from(message, quotedMessage: quotedMessage, linkPreview: linkPreview, associatedWith: thread)
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ public final class ConfigurationMessage : ControlMessage {
|
|||
public var closedGroups: Set<ClosedGroup> = []
|
||||
public var openGroups: Set<String> = []
|
||||
|
||||
public override var ttl: UInt64 { 4 * 24 * 60 * 60 * 1000 }
|
||||
|
||||
public override var isSelfSendValid: Bool { true }
|
||||
|
||||
// MARK: Initialization
|
||||
|
|
|
@ -22,7 +22,7 @@ import SessionUtilitiesKit
|
|||
outgoingMessageWithTimestamp: visibleMessage.sentTimestamp!,
|
||||
in: thread,
|
||||
messageBody: visibleMessage.text,
|
||||
attachmentIds: NSMutableArray(),
|
||||
attachmentIds: NSMutableArray(array: visibleMessage.attachmentIDs),
|
||||
expiresInSeconds: expiration,
|
||||
expireStartedAt: 0,
|
||||
isVoiceMessage: false,
|
||||
|
|
|
@ -358,11 +358,9 @@ public final class MessageSender : NSObject {
|
|||
tsMessage.update(withSentRecipient: recipient, wasSentByUD: true, transaction: transaction)
|
||||
}
|
||||
OWSDisappearingMessagesJob.shared().startAnyExpiration(for: tsMessage, expirationStartedAt: NSDate.millisecondTimestamp(), transaction: transaction)
|
||||
// Sync the message if:
|
||||
// • it wasn't a self-send
|
||||
// • it was a visible message
|
||||
// Sync the message if needed
|
||||
let userPublicKey = getUserHexEncodedPublicKey()
|
||||
if case .contact(let publicKey) = destination, publicKey != userPublicKey, let message = message as? VisibleMessage {
|
||||
if case .contact(let publicKey) = destination, let message = message as? VisibleMessage {
|
||||
message.syncTarget = publicKey
|
||||
// FIXME: Make this a job
|
||||
sendToSnodeDestination(.contact(publicKey: userPublicKey), message: message, using: transaction, isSyncMessage: true).retainUntilComplete()
|
||||
|
|
Loading…
Reference in New Issue