From 1fca5b4a5cd7387fcf5b33f8467d3f4f2f60b90d Mon Sep 17 00:00:00 2001 From: overtake Date: Fri, 29 Jan 2021 01:03:08 +0400 Subject: [PATCH 1/2] fix slow mode --- submodules/TelegramCore/Sources/ApiGroupOrChannel.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift b/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift index 28236353f8..2f15d40a23 100644 --- a/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift +++ b/submodules/TelegramCore/Sources/ApiGroupOrChannel.swift @@ -71,6 +71,9 @@ func parseTelegramGroupOrChannel(chat: Api.Chat) -> Peer? { var infoFlags = TelegramChannelGroupFlags() if (flags & Int32(1 << 22)) != 0 { infoFlags.insert(.slowModeEnabled) + } else if id == 1061639060 { + var bp:Int = 0 + bp += 1 } info = .group(TelegramChannelGroupInfo(flags: infoFlags)) } else { @@ -165,7 +168,10 @@ func mergeGroupOrChannel(lhs: Peer?, rhs: Api.Chat) -> Peer? { case .broadcast: break case .group: - let infoFlags = TelegramChannelGroupFlags() + var infoFlags = TelegramChannelGroupFlags() + if (flags & Int32(1 << 22)) != 0 { + infoFlags.insert(.slowModeEnabled) + } info = .group(TelegramChannelGroupInfo(flags: infoFlags)) } From dd7e404f6e4c9db570def4fcba625519c2abe848 Mon Sep 17 00:00:00 2001 From: overtake Date: Fri, 29 Jan 2021 13:01:44 +0400 Subject: [PATCH 2/2] - change reachability for macos support --- submodules/Reachability/Sources/Reachability.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/submodules/Reachability/Sources/Reachability.swift b/submodules/Reachability/Sources/Reachability.swift index 02c934d527..2ff4c4bf37 100644 --- a/submodules/Reachability/Sources/Reachability.swift +++ b/submodules/Reachability/Sources/Reachability.swift @@ -84,7 +84,7 @@ private final class WrappedLegacyReachability: NSObject { } } -@available(iOSApplicationExtension 12.0, iOS 12.0, *) +@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) private final class PathMonitor { private let queue: Queue private let monitor: NWPathMonitor @@ -133,7 +133,7 @@ private final class PathMonitor { } } -@available(iOSApplicationExtension 12.0, iOS 12.0, *) +@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) private final class SharedPathMonitor { static let queue = Queue() static let impl = QueueLocalObject(queue: queue, generate: { @@ -149,7 +149,7 @@ public enum Reachability { } public static var networkType: Signal { - if #available(iOSApplicationExtension 12.0, iOS 12.0, *) { + if #available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) { return Signal { subscriber in let disposable = MetaDisposable()