FIX: do not show send pm prompt when user cant pm (#25912)

Prior to this fix even when the user was not part of a group allowing sending pm we would show the prompt: "You've replied to ... X times, did you know you could send them a personal message instead?"
This commit is contained in:
Joffrey JAFFEUX
2024-02-27 11:54:05 +01:00
committed by GitHub
parent 3736d66f17
commit 64e8ad170e
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -181,6 +181,7 @@ class ComposerMessagesFinder
end
def check_get_a_room(min_users_posted: 5)
return unless @user.guardian.can_send_private_messages?
return unless educate_reply?(:notified_about_get_a_room)
return unless @details[:post_id].present?
return if @topic.category&.read_restricted