DEV: Add debug lines for mystery no_user_selected error (#8759)

On some customer forums we are randomly getting a "You must select a valid user" error when sending a PM even when all parameters seem to be OK. This is an attempt to track it down with more data.
This commit is contained in:
Martin Brennan
2020-01-21 10:50:44 +10:00
committed by GitHub
parent aa04349cfd
commit c677f8ee6a
3 changed files with 22 additions and 0 deletions

View File

@ -777,6 +777,10 @@ class PostsController < ApplicationController
result[:target_group_names] = groups.join(",")
end
if recipients.blank? || result[:target_usernames].blank?
Rails.logger.debug("Missing recipients for PM! result: #{result.inspect} | params: #{params.inspect}")
end
result.permit!
result.to_h
end