From 524598a40bd21e1fc3151ef0773022a6aa544345 Mon Sep 17 00:00:00 2001 From: Aleksei Voronov Date: Sun, 5 Nov 2023 20:51:16 +0100 Subject: [PATCH] Upgrade to latest atrium-api Some breakage there, but nothing major. They also have AtpAgent now so maybe we can get rid of our custom session-refreshing thing? --- Cargo.lock | 9 +++++---- Cargo.toml | 4 ++-- src/services/bluesky/client.rs | 3 +-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e73a282..2cd42f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,9 +163,9 @@ dependencies = [ [[package]] name = "atrium-api" -version = "0.9.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "328806e40f0fcb646f40d559eb4d9e204f04899b30082d8dd0c4f0aab6ba02bd" +checksum = "bc9e9a28946f4bddb0b3efaf84e018f242432f4759a791e4fc6c3a6e43d14ac9" dependencies = [ "async-trait", "atrium-xrpc", @@ -173,13 +173,14 @@ dependencies = [ "http", "serde", "serde_bytes", + "tokio", ] [[package]] name = "atrium-xrpc" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c68d93cfc911c693310c5a1618c7614c1d45765218b054d77663ff227b29f1" +checksum = "b8880c7efbe9750010ef44143d0aadca92d0bd45ccf4682752385e9f34af3739" dependencies = [ "async-trait", "http", diff --git a/Cargo.toml b/Cargo.toml index 3336823..afa5f4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,8 +9,8 @@ default-run = "nederlandskie" [dependencies] anyhow = "1.0.75" async-trait = "0.1.74" -atrium-api = "0.9.1" -atrium-xrpc = "0.4.0" +atrium-api = "0.11.0" +atrium-xrpc = "0.4.1" axum = "0.6.20" chat-gpt-lib-rs = "0.2.1" chrono = "0.4.31" diff --git a/src/services/bluesky/client.rs b/src/services/bluesky/client.rs index 42cd819..66f3539 100644 --- a/src/services/bluesky/client.rs +++ b/src/services/bluesky/client.rs @@ -5,7 +5,6 @@ use std::sync::Mutex; use anyhow::{anyhow, Result}; use atrium_api::blob::BlobRef; use atrium_api::client::AtpServiceClient; -use atrium_api::client::AtpServiceWrapper; use atrium_api::records::Record; use axum::http::StatusCode; use chrono::Utc; @@ -18,7 +17,7 @@ use super::internals::xrpc::AuthenticateableXrpcClient; use super::streaming::{handle_message, CommitProcessor}; pub struct Bluesky { - client: AtpServiceClient>, + client: AtpServiceClient, session: Option>>, }