Fix saving of are_media_timestamp_entities_found.
This commit is contained in:
parent
666af51345
commit
0cc22ca3da
@ -34581,15 +34581,17 @@ MessagesManager::Message *MessagesManager::add_message_to_dialog(Dialog *d, uniq
|
||||
}
|
||||
}
|
||||
|
||||
if (from_database && !message->are_media_timestamp_entities_found) {
|
||||
auto text = get_message_content_text_mutable(message->content.get());
|
||||
if (text != nullptr) {
|
||||
fix_formatted_text(text->text, text->entities, true, true, true, false, false).ensure();
|
||||
// always call to save are_media_timestamp_entities_found flag
|
||||
on_message_changed(d, message.get(), false, "save media timestamp entities");
|
||||
if (!message->are_media_timestamp_entities_found) {
|
||||
message->are_media_timestamp_entities_found = true;
|
||||
if (from_database && !td_->auth_manager_->is_bot()) { // otherwise the entities were found in get_message_text
|
||||
auto text = get_message_content_text_mutable(message->content.get());
|
||||
if (text != nullptr) {
|
||||
fix_formatted_text(text->text, text->entities, true, true, true, false, false).ensure();
|
||||
// always call to save are_media_timestamp_entities_found flag
|
||||
on_message_changed(d, message.get(), false, "save media timestamp entities");
|
||||
}
|
||||
}
|
||||
}
|
||||
message->are_media_timestamp_entities_found = true;
|
||||
|
||||
LOG(INFO) << "Adding not found " << message_id << " to " << dialog_id << " from " << source;
|
||||
if (d->is_empty) {
|
||||
|
Loading…
Reference in New Issue
Block a user