Get rid of no longer needed target_usernames warning log

This commit is contained in:
Martin Brennan 2020-01-30 12:30:11 +10:00
parent bd04b9cbbe
commit c84652eb8b
2 changed files with 0 additions and 6 deletions

View File

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

View File

@ -171,8 +171,6 @@ class TopicCreator
topic.subtype = TopicSubtype.user_to_user unless topic.subtype
unless @opts[:target_usernames].present? || @opts[:target_emails].present? || @opts[:target_group_names].present?
Rails.logger.warn("Topic PM cannot be created without recipients! opts: #{@opts.inspect}")
rollback_with!(topic, :no_user_selected)
end