diff options
Diffstat (limited to 'filamento/src/logic/online.rs')
| -rw-r--r-- | filamento/src/logic/online.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/filamento/src/logic/online.rs b/filamento/src/logic/online.rs index b36f9a9..d49a844 100644 --- a/filamento/src/logic/online.rs +++ b/filamento/src/logic/online.rs @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2025 cel <cel@bunny.garden> +// +// SPDX-License-Identifier: AGPL-3.0-or-later + use std::{io::Cursor, time::Duration}; use base64::{prelude::BASE64_STANDARD, Engine}; @@ -520,13 +524,15 @@ pub async fn handle_send_message<Fs: FileStore + Clone>(logic: &ClientLogic<Fs>, body: body.clone(), timestamp, delivery: Some(Delivery::Sending), + // TODO: raw stanza logging + source: Vec::new(), }; // try to store in message history that there is a new message that is sending. if client is quit mid-send then can mark as failed and re-send // TODO: mark these as potentially failed upon client launch if let Err(e) = logic .db() - .create_message_with_user_resource(message.clone(), jid.clone(), connection.jid().clone()) + .create_message(message.clone(), jid.clone(), connection.jid().to_bare()) .await { // TODO: should these really be handle_error or just the error macro? @@ -586,6 +592,7 @@ pub async fn handle_send_message<Fs: FileStore + Clone>(logic: &ClientLogic<Fs>, match result { Ok(_) => { info!("sent message: {:?}", message_stanza); + // TODO: raw stanza if let Err(e) = logic.db().update_message_delivery(id, Delivery::Written).await { error!("updating message delivery: {}", e); } |
