2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Track bot commands separately in different chats.

This commit is contained in:
John Preston
2021-07-01 14:05:15 +03:00
parent 93d99d6173
commit b930bc0e6d
14 changed files with 149 additions and 94 deletions

View File

@@ -515,10 +515,10 @@ void ActionsFiller::addBotCommandActions(not_null<UserData*> user) {
if (!user->isBot()) {
return QString();
}
for_const (auto &data, user->botInfo->commands) {
auto isSame = data.command.compare(
for (const auto &data : user->botInfo->commands) {
const auto isSame = !data.command.compare(
command,
Qt::CaseInsensitive) == 0;
Qt::CaseInsensitive);
if (isSame) {
return data.command;
}