Allow Slack to unfurl/expand links to "login-required" Discourse instance

I’m going to investigate working on this because I think it would add a ton of value to our private instance.

Here’s what I’m thinking:

  1. In Slack Configure an outgoing web hook in slack
    • trigger_word=myforum.domain.com
    • token=someToken
    • URLs=https://myforum.com/slackdoor/
    • text=the original chat message body that includes myforum.domain.com in there
  2. In Discourse Add /slackdoor endpoint to Discourse
    • site_setting:slackdoor_token=someToken
    • check that requestbody.token=site_setting.slackdoor_token
    • parse requestbody.text field for URL
    • retrieve post data from the post associated with the URL
    • respond with a rich body compatible with slacks message attachment api

Is part (2) of this plugin territory? Or something that belongs in core? (Or has anyone done something like this already that I haven’t seen yet).