aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server')
-rw-r--r--src/main/java/com/juick/server/api/activity/Profile.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/api/activity/Profile.java b/src/main/java/com/juick/server/api/activity/Profile.java
index f5d8025c..4e375a54 100644
--- a/src/main/java/com/juick/server/api/activity/Profile.java
+++ b/src/main/java/com/juick/server/api/activity/Profile.java
@@ -362,7 +362,8 @@ public class Profile {
}
if (activity instanceof Like || activity instanceof Announce) {
String messageUri = activity.getObject() instanceof String ? (String) activity.getObject()
- : ((Context) activity.getObject()).getId();
+ : activity.getObject() instanceof Context ? ((Context) activity.getObject()).getId()
+ : (String) ((Map)activity.getObject()).get("id");
applicationEventPublisher.publishEvent(new AnnounceEvent(this, activity.getActor(), messageUri));
return new ResponseEntity<>(CommandResult.fromString("Like/announce request accepted"), HttpStatus.OK);
}