From 6d443f13fdeb78ea9dffab8762222572038d2ce3 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Thu, 8 May 2025 14:18:53 +0100 Subject: feat(filamento): OPFS database --- filamento/src/logic/online.rs | 2 +- filamento/src/logic/process_stanza.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'filamento/src/logic') diff --git a/filamento/src/logic/online.rs b/filamento/src/logic/online.rs index 3936584..969e08a 100644 --- a/filamento/src/logic/online.rs +++ b/filamento/src/logic/online.rs @@ -478,7 +478,7 @@ pub async fn handle_set_status( pub async fn handle_send_message(logic: &ClientLogic, connection: Connected, jid: JID, body: Body) { // upsert the chat and user the message will be delivered to. if there is a conflict, it will return whatever was there, otherwise it will return false by default. // let have_chatted = logic.db().upsert_chat_and_user(&jid).await.unwrap_or(false); - let have_chatted = match logic.db().upsert_chat_and_user(&jid).await { + let have_chatted = match logic.db().upsert_chat_and_user(jid.clone()).await { Ok(have_chatted) => { have_chatted }, diff --git a/filamento/src/logic/process_stanza.rs b/filamento/src/logic/process_stanza.rs index 81c3b1f..3bc4b8c 100644 --- a/filamento/src/logic/process_stanza.rs +++ b/filamento/src/logic/process_stanza.rs @@ -80,7 +80,7 @@ pub async fn recv_message( // TODO: process message type="error" // save the message to the database - match logic.db().upsert_chat_and_user(&from).await { + match logic.db().upsert_chat_and_user(from.clone()).await { Ok(_) => { if let Err(e) = logic .db() @@ -590,7 +590,7 @@ pub async fn recv_iq( } else { match logic .db() - .read_capabilities(&query.node.clone().unwrap()) + .read_capabilities(query.node.clone().unwrap()) .await { Ok(c) => match caps::decode_info_base64(c) { -- cgit