forked from discourse/discourse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: Send TL2 promotion message to correct user (discourse#21978)
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.
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters