Move can_get_added_reactions to messageReactions.
This commit is contained in:
parent
ff174f3bce
commit
2c8a304e5a
@ -1535,8 +1535,8 @@ messageReaction type:ReactionType total_count:int32 is_chosen:Bool used_sender_i
|
||||
//@reactions List of added reactions
|
||||
//@are_tags True, if the reactions are tags and Telegram Premium users can filter messages by them
|
||||
//@paid_reactors Information about top users that added the paid reaction
|
||||
messageReactions reactions:vector<messageReaction> are_tags:Bool paid_reactors:vector<paidReactor> = MessageReactions;
|
||||
|
||||
//@can_get_added_reactions True, if the list of added reactions is available using getMessageAddedReactions
|
||||
messageReactions reactions:vector<messageReaction> are_tags:Bool paid_reactors:vector<paidReactor> can_get_added_reactions:Bool = MessageReactions;
|
||||
|
||||
//@description Contains information about interactions with a message
|
||||
//@view_count Number of times the message was viewed
|
||||
@ -3944,7 +3944,6 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool cop
|
||||
//@can_be_saved True, if content of the message can be saved locally or copied using inputMessageForwarded or forwardMessages with copy options
|
||||
//@can_be_shared_in_story True, if the message can be shared in a story using inputStoryAreaTypeMessage
|
||||
//@can_edit_scheduling_state True, if scheduling state of the message can be edited
|
||||
//@can_get_added_reactions True, if the list of added reactions is available using getMessageAddedReactions
|
||||
//@can_get_embedding_code True, if code for message embedding can be received using getMessageEmbeddingCode
|
||||
//@can_get_link True, if a link can be generated for the message using getMessageLink
|
||||
//@can_get_media_timestamp_links True, if media timestamp links can be generated for media timestamp entities in the message text, caption or link preview description using getMessageLink
|
||||
@ -3958,7 +3957,7 @@ inputMessageForwarded from_chat_id:int53 message_id:int53 in_game_share:Bool cop
|
||||
//@can_report_supergroup_spam True, if the message can be reported using reportSupergroupSpam
|
||||
//@can_set_fact_check True, if fact check for the message can be changed through setMessageFactCheck
|
||||
//@need_show_statistics True, if message statistics must be available from context menu of the message
|
||||
messageProperties can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_edit_scheduling_state:Bool can_get_added_reactions:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_viewers:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool need_show_statistics:Bool = MessageProperties;
|
||||
messageProperties can_be_deleted_only_for_self:Bool can_be_deleted_for_all_users:Bool can_be_edited:Bool can_be_forwarded:Bool can_be_paid:Bool can_be_pinned:Bool can_be_replied:Bool can_be_replied_in_another_chat:Bool can_be_saved:Bool can_be_shared_in_story:Bool can_edit_scheduling_state:Bool can_get_embedding_code:Bool can_get_link:Bool can_get_media_timestamp_links:Bool can_get_message_thread:Bool can_get_read_date:Bool can_get_statistics:Bool can_get_viewers:Bool can_recognize_speech:Bool can_report_chat:Bool can_report_reactions:Bool can_report_supergroup_spam:Bool can_set_fact_check:Bool need_show_statistics:Bool = MessageProperties;
|
||||
|
||||
|
||||
//@class SearchMessagesFilter @description Represents a filter for message search results
|
||||
@ -9078,7 +9077,7 @@ setMessageReactions chat_id:int53 message_id:int53 reaction_types:vector<Reactio
|
||||
|
||||
//@description Returns reactions added for a message, along with their sender
|
||||
//@chat_id Identifier of the chat to which the message belongs
|
||||
//@message_id Identifier of the message. Use messageProperties.can_get_added_reactions to check whether added reactions can be received for the message
|
||||
//@message_id Identifier of the message. Use message.interaction_info.reactions.can_get_added_reactions to check whether added reactions can be received for the message
|
||||
//@reaction_type Type of the reactions to return; pass null to return all added reactions
|
||||
//@offset Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
//@limit The maximum number of reactions to be returned; must be positive and can't be greater than 100
|
||||
|
@ -953,7 +953,8 @@ td_api::object_ptr<td_api::messageReactions> MessageReactions::get_message_react
|
||||
reactors =
|
||||
transform(top_reactors, [td](const MessageReactor &reactor) { return reactor.get_paid_reactor_object(td); });
|
||||
}
|
||||
return td_api::make_object<td_api::messageReactions>(std::move(reactions), are_tags_, std::move(reactors));
|
||||
return td_api::make_object<td_api::messageReactions>(std::move(reactions), are_tags_, std::move(reactors),
|
||||
can_get_added_reactions_);
|
||||
}
|
||||
|
||||
void MessageReactions::add_min_channels(Td *td) const {
|
||||
|
@ -17427,7 +17427,6 @@ void MessagesManager::get_message_properties(DialogId dialog_id, MessageId messa
|
||||
auto can_be_replied_in_another_chat = can_be_forwarded && m->message_id.is_server();
|
||||
auto can_be_shared_in_story = can_share_message_in_story(dialog_id, m);
|
||||
auto can_edit_scheduling_state = m->message_id.is_valid_scheduled() && m->message_id.is_scheduled_server();
|
||||
auto can_get_added_reactions = m->reactions != nullptr && m->reactions->can_get_added_reactions_;
|
||||
auto can_get_statistics = can_get_message_statistics(dialog_id, m);
|
||||
auto can_get_message_thread = get_top_thread_message_full_id(dialog_id, m, false).is_ok();
|
||||
auto can_get_read_date = can_get_message_read_date(dialog_id, m).is_ok();
|
||||
@ -17449,9 +17448,9 @@ void MessagesManager::get_message_properties(DialogId dialog_id, MessageId messa
|
||||
promise.set_value(td_api::make_object<td_api::messageProperties>(
|
||||
can_delete_for_self, can_delete_for_all_users, can_be_edited, can_be_forwarded, can_be_paid, can_be_pinned,
|
||||
can_be_replied, can_be_replied_in_another_chat, can_be_saved, can_be_shared_in_story, can_edit_scheduling_state,
|
||||
can_get_added_reactions, can_get_embedding_code, can_get_link, can_get_media_timestamp_links,
|
||||
can_get_message_thread, can_get_read_date, can_get_statistics, can_get_viewers, can_recognize_speech,
|
||||
can_report_chat, can_report_reactions, can_report_supergroup_spam, can_set_fact_check, need_show_statistics));
|
||||
can_get_embedding_code, can_get_link, can_get_media_timestamp_links, can_get_message_thread, can_get_read_date,
|
||||
can_get_statistics, can_get_viewers, can_recognize_speech, can_report_chat, can_report_reactions,
|
||||
can_report_supergroup_spam, can_set_fact_check, need_show_statistics));
|
||||
}
|
||||
|
||||
bool MessagesManager::is_message_edited_recently(MessageFullId message_full_id, int32 seconds) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user