Skip to content

Commit cc53f84

Browse files
authored
Merge branch 'main' into common
2 parents 6f48a9a + ac1ad3f commit cc53f84

File tree

155 files changed

+2074
-1442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+2074
-1442
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ keywords = ["atproto", "bluesky"]
2626

2727
[workspace.dependencies]
2828
# Intra-workspace dependencies
29-
atrium-api = { version = "0.24.7", path = "atrium-api", default-features = false }
29+
atrium-api = { version = "0.24.8", path = "atrium-api", default-features = false }
3030
atrium-common = { version = "0.1.0", path = "atrium-common" }
3131
atrium-identity = { version = "0.1.0", path = "atrium-oauth/identity" }
32-
atrium-xrpc = { version = "0.11.6", path = "atrium-xrpc" }
33-
atrium-xrpc-client = { version = "0.5.9", path = "atrium-xrpc-client" }
34-
bsky-sdk = { version = "0.1.12", path = "bsky-sdk" }
32+
atrium-xrpc = { version = "0.12.0", path = "atrium-xrpc" }
33+
atrium-xrpc-client = { version = "0.5.10", path = "atrium-xrpc-client" }
34+
bsky-sdk = { version = "0.1.13", path = "bsky-sdk" }
3535

3636
# DAG-CBOR codec
3737
ipld-core = { version = "0.4.1", default-features = false, features = ["std"] }

atrium-api/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.24.8](https://github.com/sugyan/atrium/compare/atrium-api-v0.24.7...atrium-api-v0.24.8) - 2024-11-19
10+
11+
### Added
12+
13+
- Update API, based on the latest lexicon schemas ([#256](https://github.com/sugyan/atrium/pull/256))
14+
- Update XrpcClient, add AuthorizationToken ([#248](https://github.com/sugyan/atrium/pull/248))
15+
- Replace OnceCell with static OnceLock for regex compilation ([#250](https://github.com/sugyan/atrium/pull/250))
16+
917
## [0.24.7](https://github.com/sugyan/atrium/compare/atrium-api-v0.24.6...atrium-api-v0.24.7) - 2024-10-28
1018

1119
### Added

atrium-api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "atrium-api"
3-
version = "0.24.7"
3+
version = "0.24.8"
44
authors = ["sugyan <[email protected]>"]
55
edition.workspace = true
66
rust-version.workspace = true

atrium-api/src/agent/inner.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
use super::{Session, SessionStore};
22
use crate::did_doc::DidDocument;
3-
use crate::types::string::Did;
4-
use crate::types::TryFromUnknown;
5-
use atrium_xrpc::error::{Error, Result, XrpcErrorKind};
6-
use atrium_xrpc::{HttpClient, OutputDataOrBytes, XrpcClient, XrpcRequest};
3+
use crate::types::{string::Did, TryFromUnknown};
4+
use atrium_xrpc::{
5+
error::{Error, Result, XrpcErrorKind},
6+
types::AuthorizationToken,
7+
HttpClient, OutputDataOrBytes, XrpcClient, XrpcRequest,
8+
};
79
use http::{Method, Request, Response};
810
use serde::{de::DeserializeOwned, Serialize};
9-
use std::fmt::Debug;
10-
use std::sync::{Arc, RwLock};
11+
use std::{
12+
fmt::Debug,
13+
sync::{Arc, RwLock},
14+
};
1115
use tokio::sync::{Mutex, Notify};
1216

1317
struct WrapperClient<S, T> {
@@ -72,13 +76,13 @@ where
7276
fn base_uri(&self) -> String {
7377
self.store.get_endpoint()
7478
}
75-
async fn authentication_token(&self, is_refresh: bool) -> Option<String> {
79+
async fn authorization_token(&self, is_refresh: bool) -> Option<AuthorizationToken> {
7680
self.store.get_session().await.map(|session| {
77-
if is_refresh {
81+
AuthorizationToken::Bearer(if is_refresh {
7882
session.data.refresh_jwt
7983
} else {
8084
session.data.access_jwt
81-
}
85+
})
8286
})
8387
}
8488
async fn atproto_proxy_header(&self) -> Option<String> {

0 commit comments

Comments
 (0)