2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Check effects availability in all SendMenu-s.

This commit is contained in:
John Preston
2024-05-10 14:10:53 +04:00
parent 396ba9a984
commit d1106e5ae6
50 changed files with 394 additions and 417 deletions

View File

@@ -1297,9 +1297,10 @@ std::optional<Reaction> Reactions::parse(const MTPAvailableEffect &entry) {
return std::nullopt;
}
const auto id = DocumentId(data.vid().v);
const auto document = _owner->document(id);
const auto stickerId = data.veffect_sticker_id().v;
const auto document = _owner->document(stickerId);
if (!document->sticker()) {
LOG(("API Error: Bad sticker in effects: %1").arg(id));
LOG(("API Error: Bad sticker in effects: %1").arg(stickerId));
return std::nullopt;
}
const auto aroundId = data.veffect_animation_id().value_or_empty();