From 52bc89ab74f05ec006ab44a4abe0632a9f735617 Mon Sep 17 00:00:00 2001 From: Mike Renoir <> Date: Fri, 23 Jun 2023 19:55:43 +0200 Subject: [PATCH] fix botapp --- .../Sources/TelegramEngine/Messages/AttachMenuBots.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/AttachMenuBots.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/AttachMenuBots.swift index 7a7c646222..7343a0022c 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/AttachMenuBots.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/AttachMenuBots.swift @@ -709,14 +709,14 @@ func _internal_getBotApp(account: Account, reference: BotAppReference) -> Signal } |> mapToSignal { result -> Signal in switch result { - case let .botApp(_, app): + case let .botApp(botAppFlags, app): switch app { case let .botApp(flags, id, accessHash, shortName, title, description, photo, document, hash): var appFlags = BotApp.Flags() - if (flags & (1 << 0)) != 0 { + if (botAppFlags & (1 << 0)) != 0 { appFlags.insert(.notActivated) } - if (flags & (1 << 1)) != 0 { + if (botAppFlags & (1 << 1)) != 0 { appFlags.insert(.requiresWriteAccess) } return .single(BotApp(id: id, accessHash: accessHash, shortName: shortName, title: title, description: description, photo: telegramMediaImageFromApiPhoto(photo), document: document.flatMap(telegramMediaFileFromApiDocument), hash: hash, flags: appFlags))