From 930e6ab6d604963ae6a48c58fc1bd3735071d9ee Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 20 Nov 2018 00:07:06 +0300 Subject: getMessage refactoring --- src/main/java/com/juick/server/api/activity/Profile.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/juick/server/api/activity') 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 10390ea1..f4160eab 100644 --- a/src/main/java/com/juick/server/api/activity/Profile.java +++ b/src/main/java/com/juick/server/api/activity/Profile.java @@ -250,7 +250,7 @@ public class Profile { messagesService.getReply(mid, rid))); } return Context.build(activityPubManager.makeNote( - messagesService.getMessage(mid))); + messagesService.getMessage(mid).orElseThrow(IllegalStateException::new))); } @PostMapping(value = "/api/inbox", consumes = {Context.LD_JSON_MEDIA_TYPE, Context.ACTIVITYSTREAMS_PROFILE_MEDIA_TYPE}) -- cgit v1.2.3