diff options
author | Vitaly Takmazov | 2019-02-24 12:21:01 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-02-24 12:21:01 +0300 |
commit | a7d29047bd49ae8afc887abba0317ba7d4aa49b1 (patch) | |
tree | 6da37d45eb2ec71eaafda6526a48111cd371c310 | |
parent | 32a92d0a8d3c99c3df4abf0aad147f868fd36775 (diff) |
Activity object still able to be Map
-rw-r--r-- | src/main/java/com/juick/server/api/activity/Profile.java | 3 |
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); } |