Add support for spoiler entities.
This commit is contained in:
parent
6ec2104b81
commit
6b137be127
1 changed files with 6 additions and 0 deletions
|
|
@ -417,6 +417,9 @@ class Client::JsonEntity : public Jsonable {
|
||||||
case td_api::textEntityTypeStrikethrough::ID:
|
case td_api::textEntityTypeStrikethrough::ID:
|
||||||
object("type", "strikethrough");
|
object("type", "strikethrough");
|
||||||
break;
|
break;
|
||||||
|
case td_api::textEntityTypeSpoiler::ID:
|
||||||
|
object("type", "spoiler");
|
||||||
|
break;
|
||||||
case td_api::textEntityTypeCode::ID:
|
case td_api::textEntityTypeCode::ID:
|
||||||
object("type", "code");
|
object("type", "code");
|
||||||
break;
|
break;
|
||||||
|
|
@ -5934,6 +5937,9 @@ td::Result<td_api::object_ptr<td_api::TextEntityType>> Client::get_text_entity_t
|
||||||
if (type == "strikethrough") {
|
if (type == "strikethrough") {
|
||||||
return make_object<td_api::textEntityTypeStrikethrough>();
|
return make_object<td_api::textEntityTypeStrikethrough>();
|
||||||
}
|
}
|
||||||
|
if (type == "spoiler") {
|
||||||
|
return make_object<td_api::textEntityTypeSpoiler>();
|
||||||
|
}
|
||||||
if (type == "code") {
|
if (type == "code") {
|
||||||
return make_object<td_api::textEntityTypeCode>();
|
return make_object<td_api::textEntityTypeCode>();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue