2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Use UserData::isBot where applicable.

This commit is contained in:
John Preston
2019-07-18 10:51:11 +02:00
parent a7d9aa947b
commit 873b77cf40
29 changed files with 105 additions and 95 deletions

View File

@@ -74,7 +74,7 @@ void CheckForSwitchInlineButton(not_null<HistoryItem*> item) {
return;
}
if (const auto user = item->history()->peer->asUser()) {
if (!user->botInfo || !user->botInfo->inlineReturnPeerId) {
if (!user->isBot() || !user->botInfo->inlineReturnPeerId) {
return;
}
if (const auto markup = item->Get<HistoryMessageReplyMarkup>()) {
@@ -2898,7 +2898,7 @@ void Session::applyUpdate(const MTPDupdateChatParticipants &update) {
if (const auto chat = chatLoaded(chatId)) {
ApplyChatUpdate(chat, update);
for (const auto user : chat->participants) {
if (user->botInfo && !user->botInfo->inited) {
if (user->isBot() && !user->botInfo->inited) {
_session->api().requestFullPeer(user);
}
}