mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-26 20:55:52 +01:00
Support expandable_blockquote entities.
This commit is contained in:
parent
70b9d04b58
commit
325dc5d293
@ -523,6 +523,9 @@ class Client::JsonEntity final : public td::Jsonable {
|
|||||||
case td_api::textEntityTypeBlockQuote::ID:
|
case td_api::textEntityTypeBlockQuote::ID:
|
||||||
object("type", "blockquote");
|
object("type", "blockquote");
|
||||||
break;
|
break;
|
||||||
|
case td_api::textEntityTypeExpandableBlockQuote::ID:
|
||||||
|
object("type", "expandable_blockquote");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
@ -542,8 +545,7 @@ class Client::JsonVectorEntities final : public td::Jsonable {
|
|||||||
auto array = scope->enter_array();
|
auto array = scope->enter_array();
|
||||||
for (auto &entity : entities_) {
|
for (auto &entity : entities_) {
|
||||||
auto entity_type = entity->type_->get_id();
|
auto entity_type = entity->type_->get_id();
|
||||||
if (entity_type != td_api::textEntityTypeExpandableBlockQuote::ID &&
|
if (entity_type != td_api::textEntityTypeBankCardNumber::ID &&
|
||||||
entity_type != td_api::textEntityTypeBankCardNumber::ID &&
|
|
||||||
entity_type != td_api::textEntityTypeMediaTimestamp::ID) {
|
entity_type != td_api::textEntityTypeMediaTimestamp::ID) {
|
||||||
array << JsonEntity(entity.get(), client_);
|
array << JsonEntity(entity.get(), client_);
|
||||||
}
|
}
|
||||||
@ -8792,6 +8794,9 @@ td::Result<td_api::object_ptr<td_api::TextEntityType>> Client::get_text_entity_t
|
|||||||
if (type == "blockquote") {
|
if (type == "blockquote") {
|
||||||
return make_object<td_api::textEntityTypeBlockQuote>();
|
return make_object<td_api::textEntityTypeBlockQuote>();
|
||||||
}
|
}
|
||||||
|
if (type == "expandable_blockquote") {
|
||||||
|
return make_object<td_api::textEntityTypeExpandableBlockQuote>();
|
||||||
|
}
|
||||||
if (type == "mention" || type == "hashtag" || type == "cashtag" || type == "bot_command" || type == "url" ||
|
if (type == "mention" || type == "hashtag" || type == "cashtag" || type == "bot_command" || type == "url" ||
|
||||||
type == "email" || type == "phone_number" || type == "bank_card_number") {
|
type == "email" || type == "phone_number" || type == "bank_card_number") {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user