Skip to content

Commit

Permalink
fix: allow post parsing again
Browse files Browse the repository at this point in the history
  • Loading branch information
CutestNekoAqua committed Jul 16, 2024
1 parent 81ef6f8 commit f22cae9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lysand/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ pub async fn lysand_post_from_db(
let data = FEDERATION_CONFIG.get().unwrap();
let domain = data.domain();
let url = generate_lysand_post_url(domain, &post.id)?;
let author = Url::parse(&post.creator.to_string())?;
let creator = prelude::User::find()
.filter(entities::user::Column::Id.eq(post.creator.clone()))
.one(DB.get().unwrap())
.await?;
let author = Url::parse(&creator.unwrap().url)?;
let visibility = match post.visibility.as_str() {
"public" => super::objects::VisibilityType::Public,
"followers" => super::objects::VisibilityType::Followers,
Expand Down

0 comments on commit f22cae9

Please sign in to comment.