aboutsummaryrefslogtreecommitdiffstats
path: root/filamento/src/logic/offline.rs
diff options
context:
space:
mode:
Diffstat (limited to 'filamento/src/logic/offline.rs')
-rw-r--r--filamento/src/logic/offline.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/filamento/src/logic/offline.rs b/filamento/src/logic/offline.rs
index b87484c..42a38ca 100644
--- a/filamento/src/logic/offline.rs
+++ b/filamento/src/logic/offline.rs
@@ -23,8 +23,8 @@ use super::{
local_only::{
handle_delete_chat, handle_delete_messaage, handle_get_chat, handle_get_chats,
handle_get_chats_ordered, handle_get_chats_ordered_with_latest_messages,
- handle_get_chats_ordered_with_latest_messages_and_users, handle_get_messages,
- handle_get_messages_with_users, handle_get_user,
+ handle_get_chats_ordered_with_latest_messages_and_users, handle_get_message,
+ handle_get_messages, handle_get_messages_with_users, handle_get_user,
},
};
@@ -89,6 +89,10 @@ pub async fn handle_offline_result<Fs: FileStore + Clone>(
let chats = handle_get_chat(logic, jid).await;
sender.send(chats);
}
+ Command::GetMessage(id, sender) => {
+ let message = handle_get_message(logic, id).await;
+ let _ = sender.send(message);
+ }
Command::GetMessages(jid, sender) => {
let messages = handle_get_messages(logic, jid).await;
sender.send(messages);
@@ -159,7 +163,7 @@ pub async fn handle_offline_result<Fs: FileStore + Clone>(
// TODO: mark these as potentially failed upon client launch
if let Err(e) = logic
.db()
- .create_message_with_self_resource(
+ .create_message_with_user_resource(
message.clone(),
jid.clone(),
// TODO: when message is queued and sent, the from must also be updated with the correct resource