From aab4cd47b1d2da5539c50675be4c7a36898189ef Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Fri, 11 Apr 2025 00:49:36 +0100 Subject: feat(filamento): `get_roster_with_users()` --- filamento/src/logic/offline.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'filamento/src/logic/offline.rs') diff --git a/filamento/src/logic/offline.rs b/filamento/src/logic/offline.rs index 566972c..82b3298 100644 --- a/filamento/src/logic/offline.rs +++ b/filamento/src/logic/offline.rs @@ -14,6 +14,7 @@ use crate::{ files::FileStore, presence::Online, roster::Contact, + user::User, }; use super::{ @@ -47,6 +48,12 @@ pub async fn handle_get_roster( Ok(logic.db().read_cached_roster().await?) } +pub async fn handle_get_roster_with_users( + logic: &ClientLogic, +) -> Result, RosterError> { + Ok(logic.db().read_cached_roster_with_users().await?) +} + pub async fn handle_offline_result( logic: &ClientLogic, command: Command, @@ -56,6 +63,10 @@ pub async fn handle_offline_result( let roster = handle_get_roster(logic).await; sender.send(roster); } + Command::GetRosterWithUsers(sender) => { + let roster = handle_get_roster_with_users(logic).await; + sender.send(roster); + } Command::GetChats(sender) => { let chats = handle_get_chats(logic).await; sender.send(chats); -- cgit