Actually set the config

This commit is contained in:
Hocuri
2022-05-05 15:17:16 +02:00
committed by Septias
parent c46d61356d
commit 7479b97a00

View File

@@ -332,7 +332,7 @@ impl Context {
if let Some(webxdc_message_id) = if let Some(webxdc_message_id) =
self.sql.get_raw_config_u32(Config::DebugLogging).await? self.sql.get_raw_config_u32(Config::DebugLogging).await?
{ {
message::delete_msgs(self, &[MsgId::new(webxdc_message_id)]).await; message::delete_msgs(self, &[MsgId::new(webxdc_message_id)]).await?;
} }
} else { } else {
let data: &[u8] = include_bytes!("../test-data/webxdc/minimal.xdc"); let data: &[u8] = include_bytes!("../test-data/webxdc/minimal.xdc");
@@ -343,8 +343,10 @@ impl Context {
file.to_abs_path().to_str().context("Non-UTF-8 blob file")?, file.to_abs_path().to_str().context("Non-UTF-8 blob file")?,
None, None,
); );
let instance_msg_id = let msg_id = chat::add_device_msg(self, None, Some(&mut instance)).await?;
chat::add_device_msg(self, None, Some(&mut instance)).await?; self.sql
.set_raw_config(key, Some(&msg_id.to_u32().to_string()))
.await?;
} }
} }
_ => { _ => {