fix: do not fail to load messages with unknown viewtype

This commit is contained in:
link2xt
2025-10-06 13:58:23 +00:00
committed by l
parent 23bfa4fc43
commit 209a8026fb
2 changed files with 19 additions and 1 deletions

View File

@@ -566,7 +566,7 @@ impl Message {
timestamp_rcvd: row.get("timestamp_rcvd")?,
ephemeral_timer: row.get("ephemeral_timer")?,
ephemeral_timestamp: row.get("ephemeral_timestamp")?,
viewtype: row.get("type")?,
viewtype: row.get("type").unwrap_or_default(),
state: state.with_mdns(mdn_msg_id.is_some()),
download_state: row.get("download_state")?,
error: Some(row.get::<_, String>("error")?)