diff --git a/submodules/TelegramUI/Sources/ChatController.swift b/submodules/TelegramUI/Sources/ChatController.swift index ea68aedc7e..499827a504 100644 --- a/submodules/TelegramUI/Sources/ChatController.swift +++ b/submodules/TelegramUI/Sources/ChatController.swift @@ -7092,6 +7092,8 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G } switch error { + case .generic: + break case let .inlineBotLocationRequest(peerId): strongSelf.present(textAlertController(context: strongSelf.context, title: nil, text: strongSelf.presentationData.strings.Conversation_ShareInlineBotLocationConfirmation, actions: [TextAlertAction(type: .defaultAction, title: strongSelf.presentationData.strings.Common_Cancel, action: { let _ = ApplicationSpecificNotice.setInlineBotLocationRequest(accountManager: strongSelf.context.sharedContext.accountManager, peerId: peerId, value: Int32(Date().timeIntervalSince1970 + 10 * 60)).start() diff --git a/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift b/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift index 3f41d03f67..32ceb31d47 100644 --- a/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift +++ b/submodules/TelegramUI/Sources/ChatInterfaceStateContextQueries.swift @@ -14,6 +14,7 @@ import DeviceLocationManager import TelegramNotices enum ChatContextQueryError { + case generic case inlineBotLocationRequest(PeerId) } @@ -296,7 +297,12 @@ private func updatedContextQueryResultStateForQuery(context: AccountContext, pee } } ?? .single(nil), offset: "") |> mapError { error -> ChatContextQueryError in - return .inlineBotLocationRequest(user.id) + switch error { + case .generic: + return .generic + case .locationRequired: + return .inlineBotLocationRequest(user.id) + } } |> map { results -> (ChatPresentationInputQueryResult?) -> ChatPresentationInputQueryResult? in return { _ in