mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Debug
This commit is contained in:
parent
7f1be7d428
commit
faa6805dcc
3 changed files with 3 additions and 10 deletions
|
@ -80,16 +80,9 @@ public final class LokiFileServerAPI : LokiDotNetAPI {
|
|||
}
|
||||
})
|
||||
}.map(on: LokiAPI.workQueue) { deviceLinks -> Set<DeviceLink> in
|
||||
func setDeviceLinks(in transaction: YapDatabaseReadWriteTransaction) {
|
||||
storage.dbReadWriteConnection.readWrite { transaction in
|
||||
storage.setDeviceLinks(deviceLinks, in: transaction)
|
||||
}
|
||||
if let transaction = transaction, transaction.connection.pendingTransactionCount != 0 { // TODO: Does keeping the transaction this long even make sense?
|
||||
setDeviceLinks(in: transaction)
|
||||
} else {
|
||||
storage.dbReadWriteConnection.readWrite { transaction in
|
||||
setDeviceLinks(in: transaction)
|
||||
}
|
||||
}
|
||||
return deviceLinks
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public final class MultiDeviceProtocol : NSObject {
|
|||
// TODO: I'm pretty sure there are quite a few holes in this logic
|
||||
let message = messageSend.message
|
||||
let recipientID = messageSend.recipient.recipientId()
|
||||
let thread = messageSend.thread!
|
||||
let thread = messageSend.thread ?? TSContactThread.getOrCreateThread(withContactId: recipientID, transaction: transaction) // TODO: Added this because I think we need it
|
||||
let isGroupMessage = thread.isGroupThread()
|
||||
let isOpenGroupMessage = (thread as? TSGroupThread)?.isPublicChat == true
|
||||
let isDeviceLinkMessage = message is DeviceLinkMessage
|
||||
|
|
|
@ -232,7 +232,7 @@ void AssertIsOnSendingQueue()
|
|||
- (void)didSucceed
|
||||
{
|
||||
if (self.message.messageState != TSOutgoingMessageStateSent) {
|
||||
OWSFailDebug(@"unexpected message status: %@", self.message.statusDescription);
|
||||
[LKLogger print:@"[Loki] Succeeded with sending a message, but the message state isn't TSOutgoingMessageStateSent."];
|
||||
}
|
||||
|
||||
self.successHandler();
|
||||
|
|
Loading…
Reference in a new issue