Slack (official plugin) sending topics from staff categories

(David O'Dea) #1


  • I have the plugin setup. However it is sending topics and replies from staff categories into the designated Slack channel. This, obviously presents an issue regarding privilege - I doubt this is intentional, so is there a work-around ?

  • Also, regarding the setup docs on the repo page above:

  • after step 4 it states:

By default, every new post on your Discourse will now create a Slack message in the channel you specified…

  • … this should be changed to state that setting up the slash command is not optional as once this plugin is installed, web-hook setup and a new topic is created/replied - it doesn’t send to slack channel unless these instructions are followed, followed by entering the appropriate /command in the slack channel assigned:
    /discourse [watch|follow|mute|help|status] [category|all]
    watch – notify this channel for new topics and new replies
    follow – notify this channel for new topics
    mute – stop notifying this channel
    status – show current notification state and categories
    i.e. /discourse watch all

only then will new topics/replies be sent successfully to the slack channel.

(Jeff Atwood) #2

@nick should answer more specifically, but I think the correct way to handle this, is to make sure the user Slack is posting on behalf of, is not a staff user?

(Nick Sahler) #3

This is the only way the plugin currently has built in. The plugin setting is “slack discourse username”

(Dave McClure) #4

I think there is still an issue here.

When you do:

/discourse status

It (correctly) only displays categories that the slack_discourse_username can see:

Here are your available categories: a, b, c

But if you do

/discourse watch all

And then create a post in the staff category, it gets posted to the channel anyway.

(Vinoth Kannan) #5

Do you mean /discourse watch all command posting topics of categories which are unavailable?

(Dave McClure) #6

Yep, that’s the problem.

(Dave McClure) #7

I’m looking forward to encouraging more people to use the plugin in their own channels now that they can subscribe to particular tags, but concerned that this issue leaves the door open for people to access categories that staff on the site assume are private.

@vinothkannans after all your work to add tag support and better test coverage of the slack plugin, do you have thoughts on how best to address this issue?

(Vinoth Kannan) #8

I created a PR for this. I hope it will this fix issue completely. Can you please look at the code?

(Dave McClure) #9

@vinothkannans and @tgxworld, from the comments on the PR, I’m having trouble understanding who is waiting for whom to make the next move.

(Vinoth Kannan) #10

As I told in PR I will do the needful soon.

Edit: @mcwumbly PR updated :thumbsup:

(Dave McClure) #11

Thanks! this is now working great.

Slack command to un(watch|follow|mute) tag or category
(Jeff Atwood) #12