2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Added initial api support of stickerset attribute in web pages.

This commit is contained in:
23rd
2024-04-18 05:14:19 +03:00
committed by John Preston
parent a3b8397361
commit f43f99cff2
6 changed files with 52 additions and 0 deletions

View File

@@ -166,6 +166,8 @@ WebPageType ParseWebPageType(
return WebPageType::ChannelBoost;
} else if (type == u"telegram_giftcode"_q) {
return WebPageType::Giftcode;
} else if (type == u"telegram_stickerset"_q) {
return WebPageType::StickerSet;
} else if (hasIV) {
return WebPageType::ArticleWithIV;
} else {
@@ -219,6 +221,7 @@ bool WebPageData::applyChanges(
DocumentData *newDocument,
WebPageCollage &&newCollage,
std::unique_ptr<Iv::Data> newIv,
std::unique_ptr<WebPageStickerSet> newStickerSet,
int newDuration,
const QString &newAuthor,
bool newHasLargeMedia,
@@ -272,6 +275,7 @@ bool WebPageData::applyChanges(
&& collage.items == newCollage.items
&& (!iv == !newIv)
&& (!iv || iv->partial() == newIv->partial())
&& (!stickerSet == !newStickerSet)
&& duration == newDuration
&& author == resultAuthor
&& hasLargeMedia == (newHasLargeMedia ? 1 : 0)
@@ -293,6 +297,7 @@ bool WebPageData::applyChanges(
document = newDocument;
collage = std::move(newCollage);
iv = std::move(newIv);
stickerSet = std::move(newStickerSet);
duration = newDuration;
author = resultAuthor;
pendingTill = newPendingTill;