From 45851ff00627995c8abbc8bf4398d2161019d704 Mon Sep 17 00:00:00 2001 From: fokx <36614441+fokx@users.noreply.github.com> Date: Fri, 24 May 2024 17:23:40 +0800 Subject: [PATCH] FIX: InvalidAccess when replying to non-original post --- lib/discourse_staff_alias/posts_controller_extension.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/discourse_staff_alias/posts_controller_extension.rb b/lib/discourse_staff_alias/posts_controller_extension.rb index eed5b95..a69fb17 100644 --- a/lib/discourse_staff_alias/posts_controller_extension.rb +++ b/lib/discourse_staff_alias/posts_controller_extension.rb @@ -14,7 +14,7 @@ module PostsControllerExtension ) == "true" existing_user = controller.current_user - if !DiscourseStaffAlias.user_allowed?(existing_user) || params[:whisper] + if !DiscourseStaffAlias.user_allowed?(existing_user) || params[:whisper] == "true" raise Discourse::InvalidAccess end