From 5a2b506b5ecb56793807aacb47b7615bba80a7cc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 10 Oct 2018 15:40:15 +0300 Subject: ActivityPub: clean up 410 followers --- juick-server/src/main/java/com/juick/server/api/activity/Profile.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-server/src/main/java/com/juick/server/api') diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java index 669a28df..357ca29c 100644 --- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java +++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java @@ -274,9 +274,12 @@ public class Profile { if (valid) { if (activity instanceof Follow) { Follow followRequest = (Follow) activity; + String actor = followRequest.getActor(); + Person follower = (Person) signatureManager.getContext(URI.create(actor)).orElseThrow(HttpBadRequestException::new); applicationEventPublisher.publishEvent( new FollowEvent(this, followRequest)); return new ResponseEntity<>(HttpStatus.ACCEPTED); + } if (activity instanceof Undo) { String follower = (String) ((Map) activity.getObject()).get("object"); -- cgit v1.2.3