Skip to content

Commit

Permalink
Keep some allowance for truncated quote length.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Nov 17, 2023
1 parent 1a70df5 commit c847574
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions td/telegram/RepliedMessageInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ bool RepliedMessageInfo::need_reply_changed_warning(
return true;
}
if (old_info.quote_ != new_info.quote_) {
auto max_size = static_cast<size_t>(td->option_manager_->get_option_integer("message_reply_quote_length_max"));
if (old_info.quote_.text.size() < max_size && new_info.quote_.text.size() < max_size) {
auto max_size = td->option_manager_->get_option_integer("message_reply_quote_length_max") - 70;
if (static_cast<int64>(max(old_info.quote_.text.size(), new_info.quote_.text.size())) < max_size) {
// quote can't change, unless truncated differently
return true;
}
Expand Down

0 comments on commit c847574

Please sign in to comment.