aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api/activity
diff options
context:
space:
mode:
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");