2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -22,6 +22,11 @@ using ChatRestriction = MTPDchatBannedRights::Flag;
using ChatAdminRights = MTPDchatAdminRights::Flags;
using ChatRestrictions = MTPDchatBannedRights::Flags;
struct BotCommand {
QString command;
QString description;
};
namespace Ui {
class EmptyUserpic;
} // namespace Ui
@@ -100,6 +105,13 @@ struct UnavailableReason {
[[nodiscard]] TimeId ChatBannedRightsUntilDate(
const MTPChatBannedRights &rights);
bool UpdateBotCommands(
std::vector<BotCommand> &commands,
const MTPVector<MTPBotCommand> &data);
bool UpdateBotCommands(
base::flat_map<UserId, std::vector<BotCommand>> &commands,
const MTPVector<MTPBotInfo> &data);
} // namespace Data
class PeerClickHandler : public ClickHandler {