Private
Public Access
1
0

sync policy: only ignore empty bodies if there are no attachments

This commit is contained in:
2025-08-24 19:46:28 -07:00
parent ee32a0398f
commit f277fcd341

View File

@@ -626,7 +626,10 @@ impl Daemon {
// the typing indicator or stuff like that. In the future, we need to move to ChatItems instead of Messages.
let insertable_messages: Vec<kordophone::model::Message> = messages
.into_iter()
.filter(|m| !m.text.is_empty() && !m.text.trim().is_empty())
.filter(|m| {
(!m.text.is_empty() && !m.text.trim().is_empty())
|| !m.file_transfer_guids.is_empty()
})
.collect();
let db_messages: Vec<kordophone_db::models::Message> = insertable_messages