|
|
|
@ -350,7 +350,6 @@ public final class MessageSender : NSObject {
|
|
|
|
|
|
|
|
|
|
// MARK: Success & Failure Handling
|
|
|
|
|
public static func handleSuccessfulMessageSend(_ message: Message, to destination: Message.Destination, isSyncMessage: Bool = false, using transaction: Any) {
|
|
|
|
|
let storage = SNMessagingKitConfiguration.shared.storage
|
|
|
|
|
let transaction = transaction as! YapDatabaseReadWriteTransaction
|
|
|
|
|
// Ignore future self-sends
|
|
|
|
|
Storage.shared.addReceivedMessageTimestamp(message.sentTimestamp!, using: transaction)
|
|
|
|
@ -359,9 +358,6 @@ public final class MessageSender : NSObject {
|
|
|
|
|
// Track the open group server message ID
|
|
|
|
|
tsMessage.openGroupServerMessageID = message.openGroupServerMessageID ?? 0
|
|
|
|
|
tsMessage.save(with: transaction)
|
|
|
|
|
if let serverID = message.openGroupServerMessageID {
|
|
|
|
|
storage.setIDForMessage(withServerID: serverID, to: tsMessage.uniqueId!, using: transaction)
|
|
|
|
|
}
|
|
|
|
|
// Mark the message as sent
|
|
|
|
|
var recipients = [ message.recipient! ]
|
|
|
|
|
if case .closedGroup(_) = destination, let threadID = message.threadID, // threadID should always be set at this point
|
|
|
|
|