From 1dbfce94308a85a6a9eba3913fcf90d5fc1d16f3 Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 21 May 2020 21:15:20 -0500 Subject: [PATCH] Fix wrong actor error ids --- src/routes/inbox.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/routes/inbox.rs b/src/routes/inbox.rs index 7a74847..31bd04b 100644 --- a/src/routes/inbox.rs +++ b/src/routes/inbox.rs @@ -116,7 +116,9 @@ async fn handle_accept(config: &Config, input: AcceptedActivities) -> Result<(), }; if !follow.actor_is(&config.generate_url(UrlKind::Actor).parse()?) { - return Err(MyError::WrongActor(id_string(follow.id())?)); + return Err(MyError::WrongActor(id_string( + follow.actor().as_single_id(), + )?)); } Ok(()) @@ -138,7 +140,9 @@ async fn handle_reject( }; if !follow.actor_is(&config.generate_url(UrlKind::Actor).parse()?) { - return Err(MyError::WrongActor(id_string(follow.id())?)); + return Err(MyError::WrongActor(id_string( + follow.actor().as_single_id(), + )?)); } jobs.queue(Reject(actor))?; @@ -169,7 +173,9 @@ async fn handle_undo( let my_id: XsdAnyUri = config.generate_url(UrlKind::Actor).parse()?; if !undone_object.object_is(&my_id) && !undone_object.object_is(&public()) { - return Err(MyError::WrongActor(id_string(undone_object.id())?)); + return Err(MyError::WrongActor(id_string( + undone_object.object().as_single_id(), + )?)); } if !is_listener {