diff options
author | Vitaly Takmazov | 2021-08-24 19:57:11 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-08-24 19:57:11 +0300 |
commit | 66faec564574352d6dd57d2f2839f64eb2391515 (patch) | |
tree | 437403e5bdb7e660871caa52add74af5a70783ff /src/main/java | |
parent | 32588150d5d7b5173270a50bfb131f21dbfa0166 (diff) |
ActivityPub: respond with BAD_REQUEST to Create without our recipient
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/juick/www/api/activity/Profile.java | 4 |
1 files changed, 2 insertions, 2 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 667092c4..aa67d130 100644 --- a/src/main/java/com/juick/www/api/activity/Profile.java +++ b/src/main/java/com/juick/www/api/activity/Profile.java @@ -363,8 +363,7 @@ public class Profile { messagesService.updateReplyUri(result.getNewMessage().get(), noteId); return new ResponseEntity<>(result, HttpStatus.OK); } - } - return new ResponseEntity<>(CommandResult.fromString("Invalid recipient"), HttpStatus.BAD_REQUEST); + } } } else { if (note.getTo().stream().anyMatch(recipient -> recipient.startsWith(baseUri))) { @@ -373,6 +372,7 @@ public class Profile { return new ResponseEntity<>(CommandResult.fromString("Message accepted"), HttpStatus.ACCEPTED); } } + return new ResponseEntity<>(CommandResult.fromString("Invalid recipient"), HttpStatus.BAD_REQUEST); } } } |