mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-08-28 01:55:19 +02:00
Support td_api::textEntityTypeBlockQuote.
This commit is contained in:
parent
1a34273163
commit
8fe04fc33a
@ -580,6 +580,9 @@ class Client::JsonEntity final : public td::Jsonable {
|
||||
object("custom_emoji_id", td::to_string(entity->custom_emoji_id_));
|
||||
break;
|
||||
}
|
||||
case td_api::textEntityTypeBlockQuote::ID:
|
||||
object("type", "blockquote");
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
@ -600,8 +603,7 @@ class Client::JsonVectorEntities final : public td::Jsonable {
|
||||
for (auto &entity : entities_) {
|
||||
auto entity_type = entity->type_->get_id();
|
||||
if (entity_type != td_api::textEntityTypeBankCardNumber::ID &&
|
||||
entity_type != td_api::textEntityTypeMediaTimestamp::ID &&
|
||||
entity_type != td_api::textEntityTypeBlockQuote::ID) {
|
||||
entity_type != td_api::textEntityTypeMediaTimestamp::ID) {
|
||||
array << JsonEntity(entity.get(), client_);
|
||||
}
|
||||
}
|
||||
@ -7946,6 +7948,9 @@ td::Result<td_api::object_ptr<td_api::TextEntityType>> Client::get_text_entity_t
|
||||
TRY_RESULT(custom_emoji_id, object.get_required_long_field("custom_emoji_id"));
|
||||
return make_object<td_api::textEntityTypeCustomEmoji>(custom_emoji_id);
|
||||
}
|
||||
if (type == "blockquote") {
|
||||
return make_object<td_api::textEntityTypeBlockQuote>();
|
||||
}
|
||||
if (type == "mention" || type == "hashtag" || type == "cashtag" || type == "bot_command" || type == "url" ||
|
||||
type == "email" || type == "phone_number" || type == "bank_card_number") {
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user