|
|
@ -66,7 +66,6 @@ public final class MessageSender {
|
|
|
|
) throws -> Promise<Void> {
|
|
|
|
) throws -> Promise<Void> {
|
|
|
|
let (promise, seal) = Promise<Void>.pending()
|
|
|
|
let (promise, seal) = Promise<Void>.pending()
|
|
|
|
let userPublicKey: String = getUserHexEncodedPublicKey(db)
|
|
|
|
let userPublicKey: String = getUserHexEncodedPublicKey(db)
|
|
|
|
let isMainAppActive: Bool = (UserDefaults.sharedLokiProject?[.isMainAppActive]).defaulting(to: false)
|
|
|
|
|
|
|
|
let messageSendTimestamp: Int64 = SnodeAPI.currentOffsetTimestampMs()
|
|
|
|
let messageSendTimestamp: Int64 = SnodeAPI.currentOffsetTimestampMs()
|
|
|
|
|
|
|
|
|
|
|
|
// Set the timestamp, sender and recipient
|
|
|
|
// Set the timestamp, sender and recipient
|
|
|
@ -261,6 +260,8 @@ public final class MessageSender {
|
|
|
|
behaviour: .runOnce,
|
|
|
|
behaviour: .runOnce,
|
|
|
|
details: NotifyPushServerJob.Details(message: snodeMessage)
|
|
|
|
details: NotifyPushServerJob.Details(message: snodeMessage)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
let isMainAppActive: Bool = (UserDefaults.sharedLokiProject?[.isMainAppActive])
|
|
|
|
|
|
|
|
.defaulting(to: false)
|
|
|
|
|
|
|
|
|
|
|
|
if isMainAppActive {
|
|
|
|
if isMainAppActive {
|
|
|
|
JobRunner.add(db, job: job)
|
|
|
|
JobRunner.add(db, job: job)
|
|
|
|