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
|
//@document Document with the background; may be null for filled backgrounds
|
||||||
linkPreviewTypeBackground document:document = LinkPreviewType;
|
linkPreviewTypeBackground document:document = LinkPreviewType;
|
||||||
|
|
||||||
//@description The link is a link to 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
|
||||||
linkPreviewTypeChannel photo:chatPhoto = LinkPreviewType;
|
|
||||||
|
|
||||||
//@description The link is a link to boost a channel chat @photo Photo of the chat
|
|
||||||
linkPreviewTypeChannelBoost photo:chatPhoto = LinkPreviewType;
|
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
|
//@description The link is a link to a Telegram Premium gift code
|
||||||
linkPreviewTypePremiumGiftCode = LinkPreviewType;
|
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
|
//@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;
|
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
|
//@description The link is a link to boost a supergroup chat @photo Photo of the chat; may be null
|
||||||
linkPreviewTypeSupergroup photo:chatPhoto = LinkPreviewType;
|
|
||||||
|
|
||||||
//@description The link is a link to boost a supergroup chat @photo Photo of the chat
|
|
||||||
linkPreviewTypeSupergroupBoost photo:chatPhoto = LinkPreviewType;
|
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
|
//@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);
|
: nullptr);
|
||||||
}
|
}
|
||||||
if (type == "channel") {
|
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_));
|
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_));
|
||||||
}
|
}
|
||||||
if (type == "channel_boost") {
|
if (type == "channel_boost") {
|
||||||
return td_api::make_object<td_api::linkPreviewTypeChannelBoost>(
|
return td_api::make_object<td_api::linkPreviewTypeChannelBoost>(
|
||||||
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_));
|
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") {
|
if (type == "chatlist") {
|
||||||
return td_api::make_object<td_api::linkPreviewTypeShareableChatFolder>();
|
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);
|
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_), true);
|
||||||
}
|
}
|
||||||
if (type == "megagroup") {
|
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_));
|
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_));
|
||||||
}
|
}
|
||||||
if (type == "stickerset") {
|
if (type == "stickerset") {
|
||||||
|
Loading…
Reference in New Issue
Block a user