diff --git a/src/chat.rs b/src/chat.rs index 2e68bc4cd..e23e1607f 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -995,6 +995,7 @@ impl ChatId { transaction.execute( "INSERT INTO msgs ( chat_id, + rfc724_mid, from_id, timestamp, type, @@ -1004,9 +1005,10 @@ impl ChatId { param, hidden, mime_in_reply_to) - VALUES (?,?,?,?,?,?,?,?,?,?);", + VALUES (?,?,?,?,?,?,?,?,?,?,?);", ( self, + &msg.rfc724_mid, ContactId::SELF, time(), msg.viewtype, diff --git a/src/webxdc/webxdc_tests.rs b/src/webxdc/webxdc_tests.rs index c0a9d347c..5b7b6309d 100644 --- a/src/webxdc/webxdc_tests.rs +++ b/src/webxdc/webxdc_tests.rs @@ -2210,6 +2210,7 @@ async fn test_self_addr_consistency() -> Result<()> { include_bytes!("../../test-data/webxdc/minimal.xdc"), )?; alice_chat.set_draft(alice, Some(&mut instance)).await?; + let mut instance = alice_chat.get_draft(alice).await?.unwrap(); let self_addr = instance.get_webxdc_self_addr(alice).await?; let sent = alice.send_msg(alice_chat, &mut instance).await; let db_msg = Message::load_from_db(alice, sent.sender_msg_id).await?;