My team would like a plugin where the system user is a random person from our PR team, as users respond better to real people than robots (even if it’s made obvious that it’s an automated action/message!)
In response, I wrote this code in a plugin:
Discourse.module_eval do def self.pr_member Group.find_by(name: "PRTeam").users.sample end def self.system_user self.pr_member end def self.site_contact_user self.pr_member end end
This seems to work fine, but are there any side effects I should be aware of for this? Is there a better way?