aboutsummaryrefslogtreecommitdiffstats
path: root/filamento/src/logic
diff options
context:
space:
mode:
Diffstat (limited to 'filamento/src/logic')
-rw-r--r--filamento/src/logic/online.rs2
-rw-r--r--filamento/src/logic/process_stanza.rs4
2 files changed, 3 insertions, 3 deletions
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<Fs: FileStore + Clone>(
pub async fn handle_send_message<Fs: FileStore + Clone>(logic: &ClientLogic<Fs>, 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<Fs: FileStore + Clone>(
// 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<Fs: FileStore + Clone>(
} 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) {