Improve method name.
This commit is contained in:
parent
723b203c7d
commit
658d172256
@ -4052,9 +4052,6 @@ getCallbackQueryMessage chat_id:int53 message_id:int53 callback_query_id:int64 =
|
|||||||
//@description Returns information about messages. If a message is not found, returns null on the corresponding position of the result @chat_id Identifier of the chat the messages belong to @message_ids Identifiers of the messages to get
|
//@description Returns information about messages. If a message is not found, returns null on the corresponding position of the result @chat_id Identifier of the chat the messages belong to @message_ids Identifiers of the messages to get
|
||||||
getMessages chat_id:int53 message_ids:vector<int53> = Messages;
|
getMessages chat_id:int53 message_ids:vector<int53> = Messages;
|
||||||
|
|
||||||
//@description Returns sponsored messages to be shown in a chat; for channel chats only @chat_id Identifier of the chat
|
|
||||||
getSponsoredMessages chat_id:int53 = SponsoredMessages;
|
|
||||||
|
|
||||||
//@description Returns information about a message thread. Can be used only if message.can_get_message_thread == true @chat_id Chat identifier @message_id Identifier of the message
|
//@description Returns information about a message thread. Can be used only if message.can_get_message_thread == true @chat_id Chat identifier @message_id Identifier of the message
|
||||||
getMessageThread chat_id:int53 message_id:int53 = MessageThreadInfo;
|
getMessageThread chat_id:int53 message_id:int53 = MessageThreadInfo;
|
||||||
|
|
||||||
@ -4212,6 +4209,9 @@ getChatScheduledMessages chat_id:int53 = Messages;
|
|||||||
//@limit The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
//@limit The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
|
||||||
getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = FoundMessages;
|
getMessagePublicForwards chat_id:int53 message_id:int53 offset:string limit:int32 = FoundMessages;
|
||||||
|
|
||||||
|
//@description Returns sponsored messages to be shown in a chat; for channel chats only @chat_id Identifier of the chat
|
||||||
|
getChatSponsoredMessages chat_id:int53 = SponsoredMessages;
|
||||||
|
|
||||||
|
|
||||||
//@description Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user @notification_group_id Identifier of notification group to which the notification belongs @notification_id Identifier of removed notification
|
//@description Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user @notification_group_id Identifier of notification group to which the notification belongs @notification_id Identifier of removed notification
|
||||||
removeNotification notification_group_id:int32 notification_id:int32 = Ok;
|
removeNotification notification_group_id:int32 notification_id:int32 = Ok;
|
||||||
|
@ -75,7 +75,7 @@ class GetSponsoredMessagesQuery final : public Td::ResultHandler {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void get_sponsored_messages(Td *td, DialogId dialog_id,
|
void get_dialog_sponsored_messages(Td *td, DialogId dialog_id,
|
||||||
Promise<td_api::object_ptr<td_api::sponsoredMessages>> &&promise) {
|
Promise<td_api::object_ptr<td_api::sponsoredMessages>> &&promise) {
|
||||||
if (!td->messages_manager_->have_dialog_force(dialog_id, "get_sponsored_messages")) {
|
if (!td->messages_manager_->have_dialog_force(dialog_id, "get_sponsored_messages")) {
|
||||||
return promise.set_error(Status::Error(400, "Chat not found"));
|
return promise.set_error(Status::Error(400, "Chat not found"));
|
||||||
|
@ -17,7 +17,7 @@ namespace td {
|
|||||||
|
|
||||||
class Td;
|
class Td;
|
||||||
|
|
||||||
void get_sponsored_messages(Td *td, DialogId dialog_id,
|
void get_dialog_sponsored_messages(Td *td, DialogId dialog_id,
|
||||||
Promise<td_api::object_ptr<td_api::sponsoredMessages>> &&promise);
|
Promise<td_api::object_ptr<td_api::sponsoredMessages>> &&promise);
|
||||||
|
|
||||||
} // namespace td
|
} // namespace td
|
||||||
|
@ -5066,10 +5066,10 @@ void Td::on_request(uint64 id, const td_api::getMessages &request) {
|
|||||||
CREATE_REQUEST(GetMessagesRequest, request.chat_id_, request.message_ids_);
|
CREATE_REQUEST(GetMessagesRequest, request.chat_id_, request.message_ids_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Td::on_request(uint64 id, const td_api::getSponsoredMessages &request) {
|
void Td::on_request(uint64 id, const td_api::getChatSponsoredMessages &request) {
|
||||||
CHECK_IS_USER();
|
CHECK_IS_USER();
|
||||||
CREATE_REQUEST_PROMISE();
|
CREATE_REQUEST_PROMISE();
|
||||||
get_sponsored_messages(this, DialogId(request.chat_id_), std::move(promise));
|
get_dialog_sponsored_messages(this, DialogId(request.chat_id_), std::move(promise));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Td::on_request(uint64 id, const td_api::getMessageThread &request) {
|
void Td::on_request(uint64 id, const td_api::getMessageThread &request) {
|
||||||
|
@ -512,7 +512,7 @@ class Td final : public NetQueryCallback {
|
|||||||
|
|
||||||
void on_request(uint64 id, const td_api::getMessages &request);
|
void on_request(uint64 id, const td_api::getMessages &request);
|
||||||
|
|
||||||
void on_request(uint64 id, const td_api::getSponsoredMessages &request);
|
void on_request(uint64 id, const td_api::getChatSponsoredMessages &request);
|
||||||
|
|
||||||
void on_request(uint64 id, const td_api::getMessageLink &request);
|
void on_request(uint64 id, const td_api::getMessageLink &request);
|
||||||
|
|
||||||
|
@ -2587,8 +2587,7 @@ class CliClient final : public Actor {
|
|||||||
get_args(args, chat_id, message_ids);
|
get_args(args, chat_id, message_ids);
|
||||||
send_request(td_api::make_object<td_api::getMessages>(as_chat_id(chat_id), as_message_ids(message_ids)));
|
send_request(td_api::make_object<td_api::getMessages>(as_chat_id(chat_id), as_message_ids(message_ids)));
|
||||||
} else if (op == "gsm") {
|
} else if (op == "gsm") {
|
||||||
string chat_id = args;
|
send_request(td_api::make_object<td_api::getChatSponsoredMessages>(as_chat_id(args)));
|
||||||
send_request(td_api::make_object<td_api::getSponsoredMessages>(as_chat_id(chat_id)));
|
|
||||||
} else if (op == "gmlink") {
|
} else if (op == "gmlink") {
|
||||||
string chat_id;
|
string chat_id;
|
||||||
string message_id;
|
string message_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user