diff options
author | 2018-10-23 12:44:53 +0300 | |
---|---|---|
committer | 2018-10-23 12:44:53 +0300 | |
commit | 2ec703610f07225ce2f82481aa736b6dca21e2d2 (patch) | |
tree | 66659d4fba7acf6bcca7872be287298e670c0a2e /juick-server/src/main/java/com/juick/server | |
parent | 6de0c5eb668f8c435dc121cf4a85465612e0ee6b (diff) |
ActivityPub: update reply uri for nester replies
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/activity/Profile.java | 6 |
1 files changed, 6 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 393b001b..317c0e5b 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 @@ -334,6 +334,12 @@ public class Profile { } CommandResult result = commandsManager.processCommand(user, String.format("#%d/%d %s", reply.getMid(), reply.getRid(), note.get("content")), URI.create(attachment)); logger.info(jsonMapper.writeValueAsString(result)); + if (result.getNewMessage().isPresent()) { + messagesService.updateReplyUri(result.getNewMessage().get(), noteId); + return new ResponseEntity<>(HttpStatus.OK); + } else { + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + } } } } |