MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / ApplyBotMenuButton

Function ApplyBotMenuButton

Telegram/SourceFiles/data/data_peer.cpp:165–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165bool ApplyBotMenuButton(
166 not_null<BotInfo*> info,
167 const MTPBotMenuButton *button) {
168 auto text = QString();
169 auto url = QString();
170 if (button) {
171 button->match([&](const MTPDbotMenuButton &data) {
172 text = qs(data.vtext());
173 url = qs(data.vurl());
174 }, [&](const auto &) {
175 });
176 }
177 const auto changed = (info->botMenuButtonText != text)
178 || (info->botMenuButtonUrl != url);
179
180 info->botMenuButtonText = text;
181 info->botMenuButtonUrl = url;
182
183 return changed;
184}
185
186AllowedReactions Parse(
187 const MTPChatReactions &value,

Callers 2

setBotInfoMethod · 0.85
feedUpdateMethod · 0.85

Calls 2

qsFunction · 0.85
QStringClass · 0.50

Tested by

no test coverage detected