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

@ -8,15 +8,14 @@ import PromiseKit
@objc(LKAPI)
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 workQueue = DispatchQueue(label: "LokiAPI.workQueue", qos: .userInitiated)
internal static var storage: OWSPrimaryStorage { OWSPrimaryStorage.shared() }
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
private static let maxRetryCount: UInt = 4
private static let defaultTimeout: TimeInterval = 20

@ -21,7 +21,7 @@ public final class ClosedGroupsProtocol : NSObject {
let hexEncodedPublicKey = envelope.source!
guard let thread = thread as? TSGroupThread, thread.groupModel.groupType == .closedGroup,
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:)

Loading…
Cancel
Save