-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: send single report PM to groups #284
Conversation
@@ -2,30 +2,24 @@ | |||
|
|||
module ::DiscourseDataExplorer | |||
class ReportGenerator | |||
def initialize(creator_user_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed as the PM is sent by the system user anyway.
return [] if recipients.empty? | ||
|
||
creator = User.find_by(id: @creator_user_id) | ||
return [] unless Guardian.new(creator).can_send_private_messages? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed as the PM is sent by the system user.
8b06b8f
to
fa976a4
Compare
fa976a4
to
410ac93
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The main change here is that we now send a single PM to a group rather than individual PMs to each group member.
We are also now setting email recipients correctly as
target_emails
, support was added for emails in this change.