diff --git a/src/main/java/smithereen/controllers/WallController.java b/src/main/java/smithereen/controllers/WallController.java index f5b6ff11..ada84bf4 100644 --- a/src/main/java/smithereen/controllers/WallController.java +++ b/src/main/java/smithereen/controllers/WallController.java @@ -136,7 +136,8 @@ public Post createWallPost(@NotNull User author, int authorAccountID, @NotNull A throw new BadRequestException("This actor doesn't support wall posts"); Post parent=inReplyToID!=0 ? getPostOrThrow(inReplyToID) : null; - context.getPrivacyController().enforcePostPrivacy(author, parent); + if(parent!=null) + context.getPrivacyController().enforcePostPrivacy(author, parent); final ArrayList mentionedUsers=new ArrayList<>(); String text=preparePostText(textSource, mentionedUsers, parent);