Merge branch 'mlin/PR/SenderKeyRemoteConfig'

This commit is contained in:
Michelle Linington 2021-07-23 14:18:18 -07:00
commit dfc95bd73c
3 changed files with 13 additions and 1 deletions

View File

@ -517,7 +517,10 @@ NSString *const OWSRequestKey_AuthKey = @"AuthKey";
}
capabilities[@"transfer"] = @(YES);
capabilities[@"senderKey"] = @(YES);
if (RemoteConfig.senderKey) {
capabilities[@"senderKey"] = @(YES);
}
return [capabilities copy];
}

View File

@ -424,6 +424,9 @@ public class DebugFlags: BaseFlags {
@objc
public static let forceNotificationServiceExtension = build.includes(.beta)
@objc
public static let forceSenderKey = build.includes(.dev)
@objc
public static let extraDebugLogs = build.includes(.openPreview)

View File

@ -221,6 +221,11 @@ public class RemoteConfig: BaseFlags {
return defaultMediaQuality
}
@objc
public static var senderKey: Bool {
DebugFlags.forceSenderKey || isEnabled(.senderKey)
}
// MARK: -
private static func interval(
@ -411,6 +416,7 @@ private struct Flags {
case viewedReceiptSending
case announcementOnlyGroups
case notificationServiceExtension
case senderKey
}
// Values defined in this array remain set once they are