2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Support story link previews.

This commit is contained in:
John Preston
2023-06-23 16:04:53 +04:00
parent 22b6f27f7b
commit 1b581a1597
11 changed files with 85 additions and 8 deletions

View File

@@ -152,6 +152,8 @@ WebPageType ParseWebPageType(
return WebPageType::WallPaper;
} else if (type == u"telegram_theme"_q) {
return WebPageType::Theme;
} else if (type == u"telegram_story"_q) {
return WebPageType::Story;
} else if (type == u"telegram_channel"_q) {
return WebPageType::Channel;
} else if (type == u"telegram_channel_request"_q) {
@@ -214,6 +216,7 @@ bool WebPageData::applyChanges(
const QString &newSiteName,
const QString &newTitle,
const TextWithEntities &newDescription,
FullStoryId newStoryId,
PhotoData *newPhoto,
DocumentData *newDocument,
WebPageCollage &&newCollage,
@@ -254,6 +257,7 @@ bool WebPageData::applyChanges(
&& siteName == resultSiteName
&& title == resultTitle
&& description.text == newDescription.text
&& storyId == newStoryId
&& photo == newPhoto
&& document == newDocument
&& collage.items == newCollage.items
@@ -271,6 +275,7 @@ bool WebPageData::applyChanges(
siteName = resultSiteName;
title = resultTitle;
description = newDescription;
storyId = newStoryId;
photo = newPhoto;
document = newDocument;
collage = std::move(newCollage);