Skip to content

Commit

Permalink
Fix automatic reply quotes.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Apr 25, 2024
1 parent 337b193 commit b149a7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 0 additions & 4 deletions td/telegram/MessageQuote.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ class MessageQuote {
return text_.text.empty();
}

bool is_manual() const {
return is_manual_;
}

MessageQuote clone(bool ignore_is_manual = false) const;

void add_dependencies(Dependencies &dependencies) const;
Expand Down
6 changes: 2 additions & 4 deletions td/telegram/RepliedMessageInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ RepliedMessageInfo::RepliedMessageInfo(Td *td, const MessageInputReplyTo &input_
return;
}
message_id_ = input_reply_to.message_id_;
if (!input_reply_to.quote_.is_empty()) {
quote_ = input_reply_to.quote_.clone();
}
quote_ = input_reply_to.quote_.clone();
if (input_reply_to.dialog_id_ != DialogId()) {
auto info =
td->messages_manager_->get_forwarded_message_info({input_reply_to.dialog_id_, input_reply_to.message_id_});
Expand All @@ -139,7 +137,7 @@ RepliedMessageInfo::RepliedMessageInfo(Td *td, const MessageInputReplyTo &input_
content_ = std::move(info.content_);
auto content_text = get_message_content_text_mutable(content_.get());
if (content_text != nullptr) {
if (!quote_.is_manual()) {
if (quote_.is_empty()) {
quote_ = MessageQuote::create_automatic_quote(td, std::move(*content_text));
}
*content_text = FormattedText();
Expand Down

0 comments on commit b149a7e

Please sign in to comment.