diff --git a/Random.txt b/Random.txt index c6648d1db0..74c153479b 100644 --- a/Random.txt +++ b/Random.txt @@ -1 +1 @@ -44eed22b384449bcec8962f2fddbfebd +3a64b94cc76109006731756f85403c85 diff --git a/submodules/MediaPickerUI/Sources/MediaPickerScreen.swift b/submodules/MediaPickerUI/Sources/MediaPickerScreen.swift index 8353f2df28..3c8960f0c3 100644 --- a/submodules/MediaPickerUI/Sources/MediaPickerScreen.swift +++ b/submodules/MediaPickerUI/Sources/MediaPickerScreen.swift @@ -235,7 +235,7 @@ public final class MediaPickerScreen: ViewController, AttachmentContainable { self.scrollingArea = SparseItemGridScrollingArea() self.cameraActivateAreaNode = AccessibilityAreaNode() - self.cameraActivateAreaNode.accessibilityLabel = self.presentationData.strings.MediaPicker_VoiceOver_Camera + self.cameraActivateAreaNode.accessibilityLabel = "Camera" self.cameraActivateAreaNode.accessibilityTraits = [.button] super.init() diff --git a/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MTApiEnvironment.h b/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MTApiEnvironment.h index bb9059b3d7..7d71e9f620 100644 --- a/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MTApiEnvironment.h +++ b/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MTApiEnvironment.h @@ -55,7 +55,7 @@ @property (nonatomic) int32_t apiId; @property (nonatomic, strong, readonly) NSString * _Nullable deviceModel; -@property (nonatomic, strong, readonly) NSDictionary * _Nullable resolvedDeviceName; +@property (nonatomic, strong, readonly) NSString * _Nullable deviceModelName; @property (nonatomic, strong, readonly) NSString * _Nullable systemVersion; @property (nonatomic, strong) NSString * _Nullable appVersion; @@ -83,6 +83,6 @@ - (MTApiEnvironment * _Nonnull)withUpdatedNetworkSettings:(MTNetworkSettings * _Nullable)networkSettings; - (MTApiEnvironment * _Nonnull)withUpdatedSystemCode:(NSData * _Nullable)systemCode; --(id _Nonnull)initWithResolvedDeviceName:(NSDictionary * _Nullable)resolvedDeviceName; +-(id _Nonnull)initWithDeviceModelName:(NSString * _Nullable)deviceModelName; @end diff --git a/submodules/MtProtoKit/Sources/MTApiEnvironment.m b/submodules/MtProtoKit/Sources/MTApiEnvironment.m index d4a225cfa6..ffdcb74d6f 100644 --- a/submodules/MtProtoKit/Sources/MTApiEnvironment.m +++ b/submodules/MtProtoKit/Sources/MTApiEnvironment.m @@ -428,7 +428,7 @@ static NSData *base64_decode(NSString *str) { @implementation MTApiEnvironment -(instancetype)init { - self = [self initWithResolvedDeviceName:nil]; + self = [self initWithDeviceModelName:nil]; if (self != nil) { @@ -436,22 +436,16 @@ static NSData *base64_decode(NSString *str) { return self; } --(id _Nonnull)initWithResolvedDeviceName:(NSDictionary * _Nullable)resolvedDeviceName { +-(id _Nonnull)initWithDeviceModelName:(NSString * _Nullable)deviceModelName { self = [super init]; if (self != nil) { - if (resolvedDeviceName != nil) { - NSString *model = [self platformString]; - NSString* resolved = resolvedDeviceName[model]; - if (resolved != nil) { - _deviceModel = resolved; - } else { - _deviceModel = model; - } + if (deviceModelName != nil) { + _deviceModel = deviceModelName; } else { _deviceModel = [self platformString]; } - _resolvedDeviceName = resolvedDeviceName; + _deviceModelName = deviceModelName; #if TARGET_OS_IPHONE _systemVersion = [[UIDevice currentDevice] systemVersion]; #else @@ -803,7 +797,7 @@ NSString *suffix = @""; } - (MTApiEnvironment *)withUpdatedLangPackCode:(NSString *)langPackCode { - MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithResolvedDeviceName:_resolvedDeviceName]; + MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithDeviceModelName:_deviceModelName]; result.apiId = self.apiId; result.appVersion = self.appVersion; @@ -827,7 +821,7 @@ NSString *suffix = @""; } - (instancetype)copyWithZone:(NSZone *)__unused zone { - MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithResolvedDeviceName:_resolvedDeviceName]; + MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithDeviceModelName:_deviceModelName]; result.apiId = self.apiId; result.appVersion = self.appVersion; @@ -851,7 +845,7 @@ NSString *suffix = @""; } - (MTApiEnvironment *)withUpdatedSocksProxySettings:(MTSocksProxySettings *)socksProxySettings { - MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithResolvedDeviceName:_resolvedDeviceName]; + MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithDeviceModelName:_deviceModelName]; result.apiId = self.apiId; result.appVersion = self.appVersion; @@ -875,7 +869,7 @@ NSString *suffix = @""; } - (MTApiEnvironment *)withUpdatedNetworkSettings:(MTNetworkSettings *)networkSettings { - MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithResolvedDeviceName:_resolvedDeviceName]; + MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithDeviceModelName:_deviceModelName]; result.apiId = self.apiId; result.appVersion = self.appVersion; @@ -899,7 +893,7 @@ NSString *suffix = @""; } - (MTApiEnvironment *)withUpdatedSystemCode:(NSData *)systemCode { - MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithResolvedDeviceName:_resolvedDeviceName]; + MTApiEnvironment *result = [[MTApiEnvironment alloc] initWithDeviceModelName:_deviceModelName]; result.apiId = self.apiId; result.appVersion = self.appVersion; diff --git a/submodules/Stripe/Sources/STPBINRange.m b/submodules/Stripe/Sources/STPBINRange.m index 29d9a2b9ba..b3c18e8d4e 100755 --- a/submodules/Stripe/Sources/STPBINRange.m +++ b/submodules/Stripe/Sources/STPBINRange.m @@ -68,6 +68,7 @@ @[@"492960", @"492960", @13, @(STPCardBrandVisa)], @[@"8600", @"8600", @16, @(STPCardBrandOther)], @[@"9860", @"9860", @16, @(STPCardBrandOther)], + @[@"2", @"2", @16, @(STPCardBrandUnknown)], ]; NSMutableArray *binRanges = [NSMutableArray array]; for (NSArray *range in ranges) { diff --git a/submodules/Stripe/Sources/STPCardValidator.m b/submodules/Stripe/Sources/STPCardValidator.m index e94e2fb492..6d3a5902ff 100755 --- a/submodules/Stripe/Sources/STPCardValidator.m +++ b/submodules/Stripe/Sources/STPCardValidator.m @@ -153,13 +153,14 @@ static NSString * _Nonnull stringByRemovingCharactersFromSet(NSString * _Nonnull return STPCardValidationStateIncomplete; } - BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber]; - return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid; + //BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber]; + //return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid; - /*STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber]; + STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber]; if (binRange.brand == STPCardBrandUnknown && validatingCardBrand) { - return STPCardValidationStateInvalid; + //return STPCardValidationStateInvalid; } + if (sanitizedNumber.length == binRange.length) { BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber]; return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid; @@ -167,7 +168,7 @@ static NSString * _Nonnull stringByRemovingCharactersFromSet(NSString * _Nonnull return STPCardValidationStateInvalid; } else { return STPCardValidationStateIncomplete; - }*/ + } } + (STPCardValidationState)validationStateForCard:(nonnull STPCardParams *)card inCurrentYear:(NSInteger)currentYear currentMonth:(NSInteger)currentMonth { diff --git a/submodules/TelegramCore/Sources/Network/Network.swift b/submodules/TelegramCore/Sources/Network/Network.swift index c8d553c96b..97af603714 100644 --- a/submodules/TelegramCore/Sources/Network/Network.swift +++ b/submodules/TelegramCore/Sources/Network/Network.swift @@ -432,8 +432,8 @@ public struct NetworkInitializationArguments { public let appData: Signal public let autolockDeadine: Signal public let encryptionProvider: EncryptionProvider - public let resolvedDeviceName:[String: String]? - public init(apiId: Int32, apiHash: String, languagesCategory: String, appVersion: String, voipMaxLayer: Int32, voipVersions: [CallSessionManagerImplementationVersion], appData: Signal, autolockDeadine: Signal, encryptionProvider: EncryptionProvider, resolvedDeviceName:[String: String]?) { + public let deviceModelName:String? + public init(apiId: Int32, apiHash: String, languagesCategory: String, appVersion: String, voipMaxLayer: Int32, voipVersions: [CallSessionManagerImplementationVersion], appData: Signal, autolockDeadine: Signal, encryptionProvider: EncryptionProvider, deviceModelName:String?) { self.apiId = apiId self.apiHash = apiHash self.languagesCategory = languagesCategory @@ -443,7 +443,7 @@ public struct NetworkInitializationArguments { self.appData = appData self.autolockDeadine = autolockDeadine self.encryptionProvider = encryptionProvider - self.resolvedDeviceName = resolvedDeviceName + self.deviceModelName = deviceModelName } } #if os(iOS) @@ -458,7 +458,7 @@ func initializedNetwork(accountId: AccountRecordId, arguments: NetworkInitializa let serialization = Serialization() - var apiEnvironment = MTApiEnvironment(resolvedDeviceName: arguments.resolvedDeviceName) + var apiEnvironment = MTApiEnvironment(deviceModelName: arguments.deviceModelName) apiEnvironment.apiId = arguments.apiId apiEnvironment.langPack = arguments.languagesCategory diff --git a/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift b/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift index bfa4f25f75..2215e349a6 100644 --- a/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift +++ b/submodules/TelegramCore/Sources/State/ApplyUpdateMessage.swift @@ -370,7 +370,7 @@ func applyUpdateGroupMessages(postbox: Postbox, stateManager: AccountStateManage mapping.append((message, MessageIndex(id: id, timestamp: storeMessage.timestamp), storeMessage)) } } else { - assertionFailure() + // assertionFailure() } } else { assertionFailure() diff --git a/submodules/TelegramCore/Sources/Utils/PeerUtils.swift b/submodules/TelegramCore/Sources/Utils/PeerUtils.swift index 760a055a88..8f15e1daa5 100644 --- a/submodules/TelegramCore/Sources/Utils/PeerUtils.swift +++ b/submodules/TelegramCore/Sources/Utils/PeerUtils.swift @@ -141,7 +141,7 @@ public extension Peer { var isDeleted: Bool { switch self { case let user as TelegramUser: - return user.firstName == nil && user.lastName == nil && user.phone == nil + return user.firstName == nil && user.lastName == nil default: return false } diff --git a/submodules/TgVoipWebrtc/tgcalls b/submodules/TgVoipWebrtc/tgcalls index d114d7a3fc..b0f186935c 160000 --- a/submodules/TgVoipWebrtc/tgcalls +++ b/submodules/TgVoipWebrtc/tgcalls @@ -1 +1 @@ -Subproject commit d114d7a3fc8adb894464a167521cbe871ba8c888 +Subproject commit b0f186935c88e09be2106c80b9880ba92fb6b2d3 diff --git a/versions.json b/versions.json index 49abfb2822..f220850f42 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,5 @@ { - "app": "9.4.2", + "app": "9.5", "bazel": "5.3.1", "xcode": "14.2" }