mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
fix botapp
This commit is contained in:
@@ -709,14 +709,14 @@ func _internal_getBotApp(account: Account, reference: BotAppReference) -> Signal
|
||||
}
|
||||
|> mapToSignal { result -> Signal<BotApp, GetBotAppError> 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))
|
||||
|
||||
Reference in New Issue
Block a user