Formatting
This commit is contained in:
parent
f0ca7e58e8
commit
8ad19f6fa5
|
@ -79,7 +79,7 @@ impl CommitProcessor for PostIndexer {
|
|||
} => {
|
||||
for algo in self.algos.iter_all() {
|
||||
if algo.should_index_post(author_did, post).await? {
|
||||
info!("Received insertable post from {author_did}: {post:?}", );
|
||||
info!("Received insertable post from {author_did}: {post:?}",);
|
||||
|
||||
self.database
|
||||
.insert_profile_if_it_doesnt_exist(author_did)
|
||||
|
|
|
@ -28,7 +28,9 @@ impl Bluesky {
|
|||
|
||||
pub fn unauthenticated() -> Self {
|
||||
Self {
|
||||
client: AtpServiceClient::new(AuthenticateableXrpcClient::new(Self::XRPC_HOST.to_owned())),
|
||||
client: AtpServiceClient::new(AuthenticateableXrpcClient::new(
|
||||
Self::XRPC_HOST.to_owned(),
|
||||
)),
|
||||
session: None,
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +38,8 @@ impl Bluesky {
|
|||
pub async fn login(handle: &str, password: &str) -> Result<Self> {
|
||||
use atrium_api::com::atproto::server::create_session::Input;
|
||||
|
||||
let client = AtpServiceClient::new(AuthenticateableXrpcClient::new(Self::XRPC_HOST.to_owned()));
|
||||
let client =
|
||||
AtpServiceClient::new(AuthenticateableXrpcClient::new(Self::XRPC_HOST.to_owned()));
|
||||
|
||||
let result = client
|
||||
.service
|
||||
|
@ -182,9 +185,13 @@ impl Bluesky {
|
|||
let url = match cursor {
|
||||
Some(cursor) => format!(
|
||||
"{}/xrpc/com.atproto.sync.subscribeRepos?cursor={}",
|
||||
Self::FIREHOSE_HOST, cursor
|
||||
Self::FIREHOSE_HOST,
|
||||
cursor
|
||||
),
|
||||
None => format!(
|
||||
"{}/xrpc/com.atproto.sync.subscribeRepos",
|
||||
Self::FIREHOSE_HOST
|
||||
),
|
||||
None => format!("{}/xrpc/com.atproto.sync.subscribeRepos", Self::FIREHOSE_HOST),
|
||||
};
|
||||
|
||||
let (mut stream, _) = connect_async(url).await?;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
mod follow;
|
||||
mod like;
|
||||
mod post;
|
||||
mod session;
|
||||
mod profile;
|
||||
mod session;
|
||||
|
||||
pub use follow::FollowRecord;
|
||||
pub use like::LikeRecord;
|
||||
pub use post::PostRecord;
|
||||
pub use session::Session;
|
||||
pub use profile::ProfileDetails;
|
||||
pub use session::Session;
|
||||
|
|
|
@ -26,7 +26,8 @@ impl TryFrom<CborValue> for PostRecord {
|
|||
.remove("langs")
|
||||
.map(|value| value.try_into())
|
||||
.transpose()?,
|
||||
reply: map.remove("reply")
|
||||
reply: map
|
||||
.remove("reply")
|
||||
.map(|value| value.try_into())
|
||||
.transpose()?,
|
||||
})
|
||||
|
|
|
@ -10,7 +10,7 @@ impl From<ProfileRecord> for ProfileDetails {
|
|||
fn from(value: ProfileRecord) -> Self {
|
||||
Self {
|
||||
display_name: value.display_name.unwrap_or_default(),
|
||||
description: value.description.unwrap_or_default()
|
||||
description: value.description.unwrap_or_default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue