aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/www/api/activity/Profile.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/api/activity/Profile.java b/src/main/java/com/juick/www/api/activity/Profile.java
index 26e2717c..e6a4e789 100644
--- a/src/main/java/com/juick/www/api/activity/Profile.java
+++ b/src/main/java/com/juick/www/api/activity/Profile.java
@@ -300,15 +300,15 @@ public class Profile {
return new ResponseEntity<>(CommandResult.fromString("Follow request accepted"), HttpStatus.ACCEPTED);
}
if (activity instanceof Undo) {
- Activity object = (Activity) activity.getObject();
+ Context object = activity.getObject();
if (object instanceof Follow) {
applicationEventPublisher
- .publishEvent(new UndoFollowEvent(this, activity.getActor(), object.getObject().getId()));
+ .publishEvent(new UndoFollowEvent(this, activity.getActor(), ((Activity)object).getObject().getId()));
return new ResponseEntity<>(CommandResult.fromString("Undo follow request accepted"),
HttpStatus.OK);
} else if (object instanceof Like || object instanceof Announce) {
applicationEventPublisher
- .publishEvent(new UndoAnnounceEvent(this, activity.getActor(), object.getObject().getId()));
+ .publishEvent(new UndoAnnounceEvent(this, activity.getActor(), ((Activity)object).getObject().getId()));
return new ResponseEntity<>(CommandResult.fromString("Undo like/announce request accepted"),
HttpStatus.OK);
}