Discovering mention in the plugins

(Maciej Kucharz) #1

I’m working on tight integration between Slack and Discourse. For now I want to extend slack notification plugin with functionality of sending special notification after mention. Can someone suggest me the right way of getting this info in a plugin? For now, I see that I can search for it in the content of the post, but maybe this is not the optimal way?


(Erlend Sogge Heggen) #2

Could you break down what you’re trying to do into steps? I’m not quite getting what’s supposed to be sent where.

Maybe @bernd or @night have grappled with this already.

(Sam Saffron) #3

Something like?

class ::Notification
   after_save :notify_slack

   def notify_slack
      # do your magic