aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api/activity
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-10 15:40:15 +0300
committerGravatar Vitaly Takmazov2018-10-10 15:40:15 +0300
commit5a2b506b5ecb56793807aacb47b7615bba80a7cc (patch)
treeb36e28e1fcc0058da11720b5d0c06d28a51905e1 /juick-server/src/main/java/com/juick/server/api/activity
parent07903dbec6fe386940fe373f778e69a153a28e6f (diff)
ActivityPub: clean up 410 followers
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/activity')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java3
1 files changed, 3 insertions, 0 deletions
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");