Add td_api::linkPreviewTypeChat.
This commit is contained in:
parent
b83fa55ee1
commit
b635ec1fa5
@ -2557,12 +2557,12 @@ webPageInstantView page_blocks:vector<PageBlock> view_count:int32 version:int32
|
||||
//@document Document with the background; may be null for filled backgrounds
|
||||
linkPreviewTypeBackground document:document = LinkPreviewType;
|
||||
|
||||
//@description The link is a link to a channel chat @photo Photo of the chat
|
||||
linkPreviewTypeChannel photo:chatPhoto = LinkPreviewType;
|
||||
|
||||
//@description The link is a link to boost a channel chat @photo Photo of the chat
|
||||
//@description The link is a link to boost a channel chat @photo Photo of the chat; may be null
|
||||
linkPreviewTypeChannelBoost photo:chatPhoto = LinkPreviewType;
|
||||
|
||||
//@description The link is a link to a chat @type Type of the chat @photo Photo of the chat; may be null
|
||||
linkPreviewTypeChat type:InviteLinkChatType photo:chatPhoto = LinkPreviewType;
|
||||
|
||||
//@description The link is a link to a Telegram Premium gift code
|
||||
linkPreviewTypePremiumGiftCode = LinkPreviewType;
|
||||
|
||||
@ -2575,10 +2575,7 @@ linkPreviewTypeStickerSet stickers:vector<sticker> = LinkPreviewType;
|
||||
//@description The link is a link to a story. Link preview description is unavailable @story_sender_chat_id The identifier of the chat that posted the story @story_id Story identifier
|
||||
linkPreviewTypeStory story_sender_chat_id:int53 story_id:int32 = LinkPreviewType;
|
||||
|
||||
//@description The link is a link to a supergroup chat @photo Photo of the chat
|
||||
linkPreviewTypeSupergroup photo:chatPhoto = LinkPreviewType;
|
||||
|
||||
//@description The link is a link to boost a supergroup chat @photo Photo of the chat
|
||||
//@description The link is a link to boost a supergroup chat @photo Photo of the chat; may be null
|
||||
linkPreviewTypeSupergroupBoost photo:chatPhoto = LinkPreviewType;
|
||||
|
||||
//@description The link is a link to a cloud theme. TDLib has no theme support yet @documents The list of files with theme description
|
||||
|
@ -1344,13 +1344,19 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
|
||||
: nullptr);
|
||||
}
|
||||
if (type == "channel") {
|
||||
return td_api::make_object<td_api::linkPreviewTypeChannel>(
|
||||
return td_api::make_object<td_api::linkPreviewTypeChat>(
|
||||
td_api::make_object<td_api::inviteLinkChatTypeChannel>(),
|
||||
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_));
|
||||
}
|
||||
if (type == "channel_boost") {
|
||||
return td_api::make_object<td_api::linkPreviewTypeChannelBoost>(
|
||||
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_));
|
||||
}
|
||||
if (type == "chat") {
|
||||
return td_api::make_object<td_api::linkPreviewTypeChat>(
|
||||
td_api::make_object<td_api::inviteLinkChatTypeBasicGroup>(),
|
||||
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_));
|
||||
}
|
||||
if (type == "chatlist") {
|
||||
return td_api::make_object<td_api::linkPreviewTypeShareableChatFolder>();
|
||||
}
|
||||
@ -1366,7 +1372,8 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
|
||||
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_), true);
|
||||
}
|
||||
if (type == "megagroup") {
|
||||
return td_api::make_object<td_api::linkPreviewTypeSupergroup>(
|
||||
return td_api::make_object<td_api::linkPreviewTypeChat>(
|
||||
td_api::make_object<td_api::inviteLinkChatTypeSupergroup>(),
|
||||
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_));
|
||||
}
|
||||
if (type == "stickerset") {
|
||||
|
Loading…
Reference in New Issue
Block a user