Private
Public Access
1
0

first pass at xpc impl

This commit is contained in:
James Magahern
2025-08-01 12:26:17 -07:00
parent 43b668e9a2
commit 911454aafb
29 changed files with 761 additions and 141 deletions

View File

@@ -271,10 +271,14 @@ impl<K: AuthenticationStore + Send + Sync> APIInterface for HTTPAPIClient<K> {
Ok(token)
}
async fn mark_conversation_as_read(&mut self, conversation_id: &ConversationID) -> Result<(), Self::Error> {
async fn mark_conversation_as_read(
&mut self,
conversation_id: &ConversationID,
) -> Result<(), Self::Error> {
// SERVER JANK: This should be POST, but it's GET for some reason.
let endpoint = format!("markConversation?guid={}", conversation_id);
self.response_with_body_retry(&endpoint, Method::GET, Body::empty, true).await?;
self.response_with_body_retry(&endpoint, Method::GET, Body::empty, true)
.await?;
Ok(())
}

View File

@@ -65,7 +65,10 @@ pub trait APIInterface {
async fn authenticate(&mut self, credentials: Credentials) -> Result<JwtToken, Self::Error>;
// (GET) /markConversation
async fn mark_conversation_as_read(&mut self, conversation_id: &ConversationID) -> Result<(), Self::Error>;
async fn mark_conversation_as_read(
&mut self,
conversation_id: &ConversationID,
) -> Result<(), Self::Error>;
// (WS) /updates
async fn open_event_socket(

View File

@@ -149,7 +149,10 @@ impl APIInterface for TestClient {
Ok(String::from("test"))
}
async fn mark_conversation_as_read(&mut self, conversation_id: &ConversationID) -> Result<(), Self::Error> {
async fn mark_conversation_as_read(
&mut self,
conversation_id: &ConversationID,
) -> Result<(), Self::Error> {
Ok(())
}
}