refactor(ports): ActivityPubRepository takes &str instead of url::Url — infra type stays in adapter
This commit is contained in:
@@ -81,10 +81,9 @@ pub async fn get_remote_actor_posts(
|
||||
viewer_id: Option<&UserId>,
|
||||
) -> Result<Paginated<FeedEntry>, DomainError> {
|
||||
let actor = federation.lookup_actor(handle).await?;
|
||||
let ap_url = url::Url::parse(&actor.url).map_err(|e| DomainError::Internal(e.to_string()))?;
|
||||
let author_id = match ap_repo.find_remote_actor_id(&ap_url).await? {
|
||||
let author_id = match ap_repo.find_remote_actor_id(&actor.url).await? {
|
||||
Some(id) => id,
|
||||
None => ap_repo.intern_remote_actor(&ap_url).await?,
|
||||
None => ap_repo.intern_remote_actor(&actor.url).await?,
|
||||
};
|
||||
let result = feed.user_feed(&author_id, &page, viewer_id).await?;
|
||||
if let Some(outbox_url) = actor.outbox_url {
|
||||
|
||||
Reference in New Issue
Block a user