| 268 | } |
| 269 | |
| 270 | void Premium::reloadHelloStickers() { |
| 271 | if (_helloStickersRequestId) { |
| 272 | return; |
| 273 | } |
| 274 | _helloStickersRequestId = _api.request(MTPmessages_GetStickers( |
| 275 | MTP_string("\xf0\x9f\x91\x8b\xe2\xad\x90\xef\xb8\x8f"), |
| 276 | MTP_long(_helloStickersHash) |
| 277 | )).done([=](const MTPmessages_Stickers &result) { |
| 278 | _helloStickersRequestId = 0; |
| 279 | result.match([&](const MTPDmessages_stickersNotModified &) { |
| 280 | }, [&](const MTPDmessages_stickers &data) { |
| 281 | _helloStickersHash = data.vhash().v; |
| 282 | const auto owner = &_session->data(); |
| 283 | _helloStickers.clear(); |
| 284 | for (const auto &sticker : data.vstickers().v) { |
| 285 | const auto document = owner->processDocument(sticker); |
| 286 | if (document->sticker()) { |
| 287 | _helloStickers.push_back(document); |
| 288 | } |
| 289 | } |
| 290 | _helloStickersUpdated.fire({}); |
| 291 | }); |
| 292 | }).fail([=] { |
| 293 | _helloStickersRequestId = 0; |
| 294 | }).send(); |
| 295 | } |
| 296 | |
| 297 | void Premium::checkGiftCode( |
| 298 | const QString &slug, |
no test coverage detected