Add message.has_sensitive_content.

This commit is contained in:
levlam 2024-08-13 21:14:41 +03:00
parent 843dff97a6
commit 0ed35e76aa
2 changed files with 8 additions and 5 deletions

View File

@ -1689,10 +1689,11 @@ factCheck text:formattedText country_code:string = FactCheck;
//@author_signature For channel posts and anonymous group messages, optional author signature
//@media_album_id Unique identifier of an album this message belongs to; 0 if none. Only audios, documents, photos and videos can be grouped together in albums
//@effect_id Unique identifier of the effect added to the message; 0 if none
//@has_sensitive_content True, if media content of the message must be hidden with 18+ spoiler
//@restriction_reason If non-empty, contains a human-readable description of the reason why access to this message must be restricted
//@content Content of the message
//@reply_markup Reply markup for the message; may be null if none
message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool is_from_offline:Bool can_be_saved:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> fact_check:factCheck reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_business_bot_user_id:int53 sender_boost_count:int32 author_signature:string media_album_id:int64 effect_id:int64 restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message;
message id:int53 sender_id:MessageSender chat_id:int53 sending_state:MessageSendingState scheduling_state:MessageSchedulingState is_outgoing:Bool is_pinned:Bool is_from_offline:Bool can_be_saved:Bool has_timestamped_media:Bool is_channel_post:Bool is_topic_message:Bool contains_unread_mention:Bool date:int32 edit_date:int32 forward_info:messageForwardInfo import_info:messageImportInfo interaction_info:messageInteractionInfo unread_reactions:vector<unreadReaction> fact_check:factCheck reply_to:MessageReplyTo message_thread_id:int53 saved_messages_topic_id:int53 self_destruct_type:MessageSelfDestructType self_destruct_in:double auto_delete_in:double via_bot_user_id:int53 sender_business_bot_user_id:int53 sender_boost_count:int32 author_signature:string media_album_id:int64 effect_id:int64 has_sensitive_content:Bool restriction_reason:string content:MessageContent reply_markup:ReplyMarkup = Message;
//@description Contains a list of messages @total_count Approximate total number of messages found @messages List of messages; messages may be null

View File

@ -23037,8 +23037,9 @@ td_api::object_ptr<td_api::message> MessagesManager::get_dialog_event_log_messag
nullptr, nullptr, m->is_outgoing, m->is_pinned, m->is_from_offline, can_be_saved, true, m->is_channel_post,
m->is_topic_message, false, m->date, edit_date, std::move(forward_info), std::move(import_info),
std::move(interaction_info), Auto(), nullptr, nullptr, 0, 0, nullptr, 0.0, 0.0, via_bot_user_id, 0,
m->sender_boost_count, m->author_signature, 0, 0, get_restriction_reason_description(m->restriction_reasons),
std::move(content), std::move(reply_markup));
m->sender_boost_count, m->author_signature, 0, 0,
get_restriction_reason_has_sensitive_content(m->restriction_reasons),
get_restriction_reason_description(m->restriction_reasons), std::move(content), std::move(reply_markup));
}
td_api::object_ptr<td_api::businessMessage> MessagesManager::get_business_message_object(
@ -23105,8 +23106,8 @@ td_api::object_ptr<td_api::message> MessagesManager::get_business_message_messag
nullptr, nullptr, m->is_outgoing, false, m->is_from_offline, can_be_saved, false, false, false, false, m->date,
m->edit_date, std::move(forward_info), std::move(import_info), nullptr, Auto(), nullptr, std::move(reply_to), 0,
0, std::move(self_destruct_type), 0.0, 0.0, via_bot_user_id, via_business_bot_user_id, 0, string(),
m->media_album_id, m->effect_id.get(), get_restriction_reason_description(m->restriction_reasons),
std::move(content), std::move(reply_markup));
m->media_album_id, m->effect_id.get(), get_restriction_reason_has_sensitive_content(m->restriction_reasons),
get_restriction_reason_description(m->restriction_reasons), std::move(content), std::move(reply_markup));
}
td_api::object_ptr<td_api::message> MessagesManager::get_message_object(Dialog *d, MessageId message_id,
@ -23198,6 +23199,7 @@ td_api::object_ptr<td_api::message> MessagesManager::get_message_object(DialogId
td_->saved_messages_manager_->get_saved_messages_topic_id_object(m->saved_messages_topic_id),
std::move(self_destruct_type), ttl_expires_in, auto_delete_in, via_bot_user_id, via_business_bot_user_id,
m->sender_boost_count, m->author_signature, m->media_album_id, m->effect_id.get(),
get_restriction_reason_has_sensitive_content(m->restriction_reasons),
get_restriction_reason_description(m->restriction_reasons), std::move(content), std::move(reply_markup));
}