Private
Public Access
1
0

Implements mark as read

This commit is contained in:
2025-06-18 15:02:04 -07:00
parent fa6c7c50b7
commit 3b30cb77c8
13 changed files with 172 additions and 13 deletions

View File

@@ -58,6 +58,9 @@ pub enum Commands {
/// Uploads an attachment to the server, returns upload guid.
UploadAttachment { path: String },
/// Marks a conversation as read.
MarkConversationAsRead { conversation_id: String },
}
#[derive(Subcommand)]
@@ -99,6 +102,9 @@ impl Commands {
Commands::DownloadAttachment { attachment_id } => {
client.download_attachment(attachment_id).await
}
Commands::MarkConversationAsRead { conversation_id } => {
client.mark_conversation_as_read(conversation_id).await
}
}
}
}
@@ -289,4 +295,9 @@ impl DaemonCli {
println!("Upload GUID: {}", upload_guid);
Ok(())
}
pub async fn mark_conversation_as_read(&mut self, conversation_id: String) -> Result<()> {
KordophoneRepository::mark_conversation_as_read(&self.proxy(), &conversation_id)
.map_err(|e| anyhow::anyhow!("Failed to mark conversation as read: {}", e))
}
}