mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
chatbot fixes
This commit is contained in:
@@ -1068,6 +1068,8 @@ public func _internal_setAccountConnectedBot(account: Account, bot: TelegramAcco
|
|||||||
flags |= 1 << 0
|
flags |= 1 << 0
|
||||||
}
|
}
|
||||||
mappedRecipients = bot.recipients.apiInputBotValue(additionalPeers: additionalPeers, excludePeers: excludePeers)
|
mappedRecipients = bot.recipients.apiInputBotValue(additionalPeers: additionalPeers, excludePeers: excludePeers)
|
||||||
|
} else {
|
||||||
|
flags |= 1 << 1
|
||||||
}
|
}
|
||||||
|
|
||||||
return account.network.request(Api.functions.account.updateConnectedBot(flags: flags, bot: mappedBot, recipients: mappedRecipients))
|
return account.network.request(Api.functions.account.updateConnectedBot(flags: flags, bot: mappedBot, recipients: mappedRecipients))
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ func _internal_fetchAndUpdateCachedPeerData(accountPeerId: PeerId, peerId rawPee
|
|||||||
switch apiBot {
|
switch apiBot {
|
||||||
case let .connectedBot(flags, botId, recipients):
|
case let .connectedBot(flags, botId, recipients):
|
||||||
mappedConnectedBot = TelegramAccountConnectedBot(
|
mappedConnectedBot = TelegramAccountConnectedBot(
|
||||||
id: PeerId(botId),
|
id: PeerId(namespace: Namespaces.Peer.CloudUser, id: PeerId.Id._internalFromInt64Value(botId)),
|
||||||
recipients: TelegramBusinessRecipients(apiValue: recipients),
|
recipients: TelegramBusinessRecipients(apiValue: recipients),
|
||||||
canReply: (flags & (1 << 0)) != 0
|
canReply: (flags & (1 << 0)) != 0
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user