Add url to richTextRefernce/AnchorLink.
GitOrigin-RevId: 68d814307eb4906c0429cd6674939460b6b9173c
This commit is contained in:
parent
cc8d876589
commit
82e43bc7eb
@ -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> = RichText;
|
||||
|
Binary file not shown.
@ -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<td_api::richTextAnchorLink>(texts[0].get_rich_text_object(context), anchor.str());
|
||||
return make_tl_object<td_api::richTextAnchorLink>(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<td_api::richTextReference>(texts[0].get_rich_text_object(context),
|
||||
std::move(reference_text));
|
||||
std::move(reference_text), content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user