tg_cli: support reply with quote.
This commit is contained in:
parent
dc930122a8
commit
4648901627
@ -925,7 +925,8 @@ class CliClient final : public Actor {
|
|||||||
|
|
||||||
td_api::object_ptr<td_api::InputMessageReplyTo> get_input_message_reply_to() const {
|
td_api::object_ptr<td_api::InputMessageReplyTo> get_input_message_reply_to() const {
|
||||||
if (reply_message_id_ != 0) {
|
if (reply_message_id_ != 0) {
|
||||||
return td_api::make_object<td_api::inputMessageReplyToMessage>(reply_chat_id_, reply_message_id_, nullptr);
|
return td_api::make_object<td_api::inputMessageReplyToMessage>(reply_chat_id_, reply_message_id_,
|
||||||
|
as_formatted_text(reply_quote_));
|
||||||
}
|
}
|
||||||
if (reply_user_id_ != 0 || reply_story_id_ != 0) {
|
if (reply_user_id_ != 0 || reply_story_id_ != 0) {
|
||||||
return td_api::make_object<td_api::inputMessageReplyToStory>(reply_user_id_, reply_story_id_);
|
return td_api::make_object<td_api::inputMessageReplyToStory>(reply_user_id_, reply_story_id_);
|
||||||
@ -4463,6 +4464,8 @@ class CliClient final : public Actor {
|
|||||||
send_request(td_api::make_object<td_api::setChatMessageSender>(chat_id, as_message_sender(sender_id)));
|
send_request(td_api::make_object<td_api::setChatMessageSender>(chat_id, as_message_sender(sender_id)));
|
||||||
} else if (op == "smr") {
|
} else if (op == "smr") {
|
||||||
get_args(args, reply_message_id_, reply_chat_id_);
|
get_args(args, reply_message_id_, reply_chat_id_);
|
||||||
|
} else if (op == "smrq") {
|
||||||
|
reply_quote_ = args;
|
||||||
} else if (op == "smrs") {
|
} else if (op == "smrs") {
|
||||||
get_args(args, reply_user_id_, reply_story_id_);
|
get_args(args, reply_user_id_, reply_story_id_);
|
||||||
} else if (op == "sm" || op == "sms" || op == "smf") {
|
} else if (op == "sm" || op == "sms" || op == "smf") {
|
||||||
@ -6247,6 +6250,7 @@ class CliClient final : public Actor {
|
|||||||
|
|
||||||
ChatId reply_chat_id_;
|
ChatId reply_chat_id_;
|
||||||
MessageId reply_message_id_;
|
MessageId reply_message_id_;
|
||||||
|
string reply_quote_;
|
||||||
UserId reply_user_id_;
|
UserId reply_user_id_;
|
||||||
StoryId reply_story_id_;
|
StoryId reply_story_id_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user