| 163 | } |
| 164 | |
| 165 | bool 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 | |
| 186 | AllowedReactions Parse( |
| 187 | const MTPChatReactions &value, |
no test coverage detected