10ee92656c
Usually, when a user is promoted to TL2 two messages are sent. The first one is a system message 'tl2_promotion_message' which triggers a 'system_message_sent' Discourse event. When the event is fired and if Discourse Narrative Bot is enabled, then a second message is sent to the recipient of the first message. The recipients was determined by looking at the list of users that can access that topic and pick the last one. This method does not work if 'site_contact_group_name' site setting is set because it adds the group in the list of recipients. A solution to this problem would have been to select the last user in the list of 'topic_allowed_users', but an even better solution is to pass the name of the recipients when the 'system_message_sent' Discourse event is fired. |
||
---|---|---|
.. | ||
assets | ||
autoload/jobs | ||
config | ||
db | ||
lib/discourse_narrative_bot | ||
public/images | ||
spec | ||
plugin.rb |