Existing plugins for Message Notify seem to be able to extract contact information from the Message object's owner (the user represented by their `uid` property) and send to those users. That is, if you're using the email notifier it can email that user, and if you're using the SMS notifier it can text that user. We should do something similar for Slack notifications.
This is a bit tricky to navigate given that Drupal core doesn't (and shouldn't) have Slack username references attached to the user object. Ideally the Slack module itself would provide that data and a means to collect it (either by an API call to user.list, or just by having users enter it in on their profile page). https://www.drupal.org/node/2845955 is relevant, but D7-only and the patch hasn't been accepted yet.
If that functionality existed, it would be very simple to utilize it in the notifier here.
Comments