Skip to content

Commit

Permalink
fix links
Browse files Browse the repository at this point in the history
  • Loading branch information
CutestNekoAqua committed Feb 3, 2025
1 parent 14e4402 commit 98cf521
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/versia/conversion.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::fmt::format;

use activitypub_federation::{
fetch::object_id::ObjectId, http_signatures::generate_actor_keypair, traits::Object,
};
Expand Down Expand Up @@ -511,9 +513,15 @@ pub async fn receive_versia_note(
println!("{}", note.author.clone());
let user = fetch_user_from_url(note.author.clone()).await?;
let mut tag: Vec<Mention> = Vec::new();
let domain = API_DOMAIN.as_str();
for l_tag in note.mentions.clone().unwrap_or_default() {
let user = db_user_from_url(l_tag).await?;
let ap_url = Url::parse(&format!(
"https://{}/apbridge/user/{}",
domain, user.id
).to_string())?;
tag.push(Mention {
href: l_tag, //TODO convert to ap url
href: ap_url,
kind: Default::default(),
})
}
Expand Down

0 comments on commit 98cf521

Please sign in to comment.