mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-20 09:37:47 +01:00
Add support for spoiler entities.
This commit is contained in:
parent
6ec2104b81
commit
6b137be127
@ -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…
Reference in New Issue
Block a user