Replaced int botStatus with a type-safe Data::BotStatus enum class.

This commit is contained in:
23rd
2026-03-30 11:52:49 +03:00
parent 8f4b6f80ad
commit aa5e0440d4
12 changed files with 57 additions and 50 deletions
@@ -40,8 +40,8 @@ QString WrapCommandInChat(
? peer->asChat()->botStatus
: peer->isMegagroup()
? peer->asChannel()->mgInfo->botStatus
: -1;
return ((command.indexOf('@') < 2) && (botStatus == 0 || botStatus == 2))
: Data::BotStatus::NoBots;
return ((command.indexOf('@') < 2) && (botStatus != Data::BotStatus::NoBots))
? command + '@' + bot->username()
: command;
}