diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 222dd613..b2596654 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -843,14 +843,14 @@ richTextPhoneNumber text:RichText phone_number:string = RichText; //@height Height of a bounding box in which the image should be shown; 0 if unknown richTextIcon document:document width:int32 height:int32 = RichText; -//@description A rich text reference of a text on the same web page @text The text @reference_text The text to show on click -richTextReference text:RichText reference_text:RichText = RichText; +//@description A rich text reference of a text on the same web page @text The text @reference_text The text to show on click @url An HTTP URL, opening the reference +richTextReference text:RichText reference_text:RichText url:string = RichText; //@description An anchor @name Anchor name richTextAnchor name:string = RichText; -//@description A link to an anchor on the same web page @text The link text @name The anchor name -richTextAnchorLink text:RichText name:string = RichText; +//@description A link to an anchor on the same web page @text The link text @name The anchor name @url An HTTP URL, opening the anchor +richTextAnchorLink text:RichText name:string url:string = RichText; //@description A concatenation of rich texts @texts Texts richTexts texts:vector = RichText; diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 01bdf0cb..bdc5eb16 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/WebPageBlock.cpp b/td/telegram/WebPageBlock.cpp index 9e213002..bc207153 100644 --- a/td/telegram/WebPageBlock.cpp +++ b/td/telegram/WebPageBlock.cpp @@ -126,13 +126,14 @@ class RichText { auto it = context->anchors_.find(anchor); if (it != context->anchors_.end()) { if (it->second == nullptr) { - return make_tl_object(texts[0].get_rich_text_object(context), anchor.str()); + return make_tl_object(texts[0].get_rich_text_object(context), anchor.str(), + content); } else { context->is_first_pass_ = true; auto reference_text = it->second->get_rich_text_object(context); context->is_first_pass_ = false; return make_tl_object(texts[0].get_rich_text_object(context), - std::move(reference_text)); + std::move(reference_text), content); } } }