2022-05-14 20:50:02 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#include "data/data_peer_bot_command.h"
|
|
|
|
|
|
|
|
namespace Data {
|
|
|
|
|
2022-05-14 21:27:21 +00:00
|
|
|
BotCommand BotCommandFromTL(const MTPBotCommand &result) {
|
|
|
|
return result.match([](const MTPDbotCommand &data) {
|
|
|
|
return BotCommand {
|
|
|
|
.command = qs(data.vcommand().v),
|
|
|
|
.description = qs(data.vdescription().v),
|
|
|
|
};
|
|
|
|
});
|
2022-05-14 20:50:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Data
|