Add td_api::linkPreviewTypeVideoChat.
This commit is contained in:
parent
2ae48540b1
commit
8d6cb39a8e
@ -2571,6 +2571,11 @@ linkPreviewTypeStory story_sender_chat_id:int53 story_id:int32 = 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
|
||||||
linkPreviewTypeTheme documents:vector<document> = LinkPreviewType;
|
linkPreviewTypeTheme documents:vector<document> = LinkPreviewType;
|
||||||
|
|
||||||
|
//@description The link is a link to a video chat
|
||||||
|
//@photo Photo of the chat with the video chat; may be null if none
|
||||||
|
//@is_live_stream True, if the video chat is expected to be a live stream in a channel or a broadcast group
|
||||||
|
linkPreviewTypeVideoChat photo:chatPhoto is_live_stream:Bool = LinkPreviewType;
|
||||||
|
|
||||||
//@description The link preview type is unsupported yet @type String type of the link preview. Can be: article, photo, audio, video, document, profile, app, or something else
|
//@description The link preview type is unsupported yet @type String type of the link preview. Can be: article, photo, audio, video, document, profile, app, or something else
|
||||||
linkPreviewTypeOther type:string = LinkPreviewType;
|
linkPreviewTypeOther type:string = LinkPreviewType;
|
||||||
|
|
||||||
|
@ -1349,6 +1349,10 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
|
|||||||
if (type == "giftcode") {
|
if (type == "giftcode") {
|
||||||
return td_api::make_object<td_api::linkPreviewTypePremiumGiftCode>();
|
return td_api::make_object<td_api::linkPreviewTypePremiumGiftCode>();
|
||||||
}
|
}
|
||||||
|
if (type == "livestream") {
|
||||||
|
return td_api::make_object<td_api::linkPreviewTypeVideoChat>(
|
||||||
|
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_), true);
|
||||||
|
}
|
||||||
if (type == "stickerset") {
|
if (type == "stickerset") {
|
||||||
auto stickers = transform(web_page->sticker_ids_, [&](FileId sticker_id) {
|
auto stickers = transform(web_page->sticker_ids_, [&](FileId sticker_id) {
|
||||||
return td_->stickers_manager_->get_sticker_object(sticker_id);
|
return td_->stickers_manager_->get_sticker_object(sticker_id);
|
||||||
@ -1378,6 +1382,10 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
|
|||||||
// TODO add theme settings
|
// TODO add theme settings
|
||||||
return td_api::make_object<td_api::linkPreviewTypeTheme>(std::move(documents));
|
return td_api::make_object<td_api::linkPreviewTypeTheme>(std::move(documents));
|
||||||
}
|
}
|
||||||
|
if (type == "videochat") {
|
||||||
|
return td_api::make_object<td_api::linkPreviewTypeVideoChat>(
|
||||||
|
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_), false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// TODO LOG(ERROR) << "Receive link preview of unsupported type " << web_page->type_;
|
// TODO LOG(ERROR) << "Receive link preview of unsupported type " << web_page->type_;
|
||||||
return td_api::make_object<td_api::linkPreviewTypeOther>(web_page->type_);
|
return td_api::make_object<td_api::linkPreviewTypeOther>(web_page->type_);
|
||||||
|
Loading…
Reference in New Issue
Block a user