This commit is contained in:
Mikhail Kilin
2026-01-25 01:47:38 +03:00
parent fa749d24c5
commit e4dabbe3ac
2 changed files with 37 additions and 3 deletions

View File

@@ -429,10 +429,17 @@ impl TdClient {
match existing_idx {
Some(idx) => {
// Сообщение уже есть - обновляем только если входящее
// (исходящие уже добавлены через send_message с правильным reply_to)
// Сообщение уже есть - обновляем
if is_incoming {
self.current_chat_messages[idx] = msg_info;
} else {
// Для исходящих: обновляем can_be_edited и другие поля,
// но сохраняем reply_to (добавленный при отправке)
let existing = &mut self.current_chat_messages[idx];
existing.can_be_edited = msg_info.can_be_edited;
existing.can_be_deleted_only_for_self = msg_info.can_be_deleted_only_for_self;
existing.can_be_deleted_for_all_users = msg_info.can_be_deleted_for_all_users;
existing.is_read = msg_info.is_read;
}
}
None => {