pull/162/head
nielsandriesse 5 years ago
parent faa6805dcc
commit 2c5b3ecdc1

@ -8,14 +8,13 @@ import PromiseKit
@objc(LKAPI) @objc(LKAPI)
public final class LokiAPI : NSObject { public final class LokiAPI : NSObject {
/// All service node related errors must be handled on this queue to avoid race conditions maintaining e.g. failure counts.
internal static let errorHandlingQueue = DispatchQueue(label: "LokiAPI.errorHandlingQueue")
internal static let stateQueue = DispatchQueue(label: "LokiAPI.stateQueue") internal static let stateQueue = DispatchQueue(label: "LokiAPI.stateQueue")
internal static let workQueue = DispatchQueue(label: "LokiAPI.workQueue", qos: .userInitiated) internal static let workQueue = DispatchQueue(label: "LokiAPI.workQueue", qos: .userInitiated)
internal static var storage: OWSPrimaryStorage { OWSPrimaryStorage.shared() } internal static var storage: OWSPrimaryStorage { OWSPrimaryStorage.shared() }
internal static var userHexEncodedPublicKey: String { getUserHexEncodedPublicKey() } internal static var userHexEncodedPublicKey: String { getUserHexEncodedPublicKey() }
/// All service node related errors must be handled on this queue to avoid race conditions maintaining e.g. failure counts.
public static let errorHandlingQueue = DispatchQueue(label: "LokiAPI.errorHandlingQueue")
// MARK: Settings // MARK: Settings
private static let maxRetryCount: UInt = 4 private static let maxRetryCount: UInt = 4

@ -21,7 +21,7 @@ public final class ClosedGroupsProtocol : NSObject {
let hexEncodedPublicKey = envelope.source! let hexEncodedPublicKey = envelope.source!
guard let thread = thread as? TSGroupThread, thread.groupModel.groupType == .closedGroup, guard let thread = thread as? TSGroupThread, thread.groupModel.groupType == .closedGroup,
dataMessage.group?.type == .deliver else { return false } dataMessage.group?.type == .deliver else { return false }
return thread.isUser(inGroup: hexEncodedPublicKey, transaction: transaction) return !thread.isUser(inGroup: hexEncodedPublicKey, transaction: transaction)
} }
@objc(shouldIgnoreClosedGroupUpdateMessage:in:using:) @objc(shouldIgnoreClosedGroupUpdateMessage:in:using:)

Loading…
Cancel
Save