# Slack (official plugin) sending topics from staff categories

**URL:** https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578
**Category:** Support
**Tags:** chat-integration
**Created:** [2016 年9 月 1 日 20:40 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578 "2016-09-01T20:40:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### 作者： ![kuyashi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kuyashi/32/82068_2.png) [@kuyashi](https://meta.discourse.org/u/kuyashi)
#### 发布日期： [2016 年9 月 1 日 20:40 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/1 "2016-09-01T20:40:37Z")

</div>

Regarding:  
[https://github.com/discourse/discourse-slack-official](https://github.com/discourse/discourse-slack-official)

- 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](https://github.com/discourse/discourse-slack-official/blob/master/README-SLASHCOMMAND.md) 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.

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2016 年9 月 1 日 23:20 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/2 "2016-09-01T23:20:26Z")

</div>

@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?

---

<div class="post-metadata">

### 作者： ![Nick](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nick/32/235642_2.png) [@Nick](https://meta.discourse.org/u/Nick)
#### 发布日期： [2016 年9 月 1 日 23:30 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/3 "2016-09-01T23:30:31Z")

</div>

> [@codinghorror](#):
>
> make sure the user Slack is posting on behalf of, is not a staff user?

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

---

<div class="post-metadata">

### 作者： ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### 发布日期： [2017 年3 月 1 日 15:26 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/4 "2017-03-01T15:26:58Z")

</div>

I think there is still an issue here.

When you do:

```plaintext
/discourse status

```

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

```plaintext
Here are your available categories: a, b, c

```

But if you do

```plaintext
/discourse watch all

```

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

---

<div class="post-metadata">

### 作者： ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### 发布日期： [2017 年3 月 1 日 15:59 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/5 "2017-03-01T15:59:49Z")

</div>

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

---

<div class="post-metadata">

### 作者： ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### 发布日期： [2017 年3 月 1 日 16:41 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/6 "2017-03-01T16:41:54Z")

</div>

Yep, that’s the problem.

---

<div class="post-metadata">

### 作者： ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### 发布日期： [2017 年4 月 5 日 14:12 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/7 "2017-04-05T14:12:11Z")

</div>

I’m looking forward to encouraging more people to use the plugin in their own channels [now that they can subscribe to particular tags](https://meta.discourse.org/t/the-official-discourse-slack-plugin/51412/37), 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?

---

<div class="post-metadata">

### 作者： ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### 发布日期： [2017 年4 月 5 日 14:44 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/8 "2017-04-05T14:44:05Z")

</div>

[https://github.com/discourse/discourse-slack-official/pull/29](https://github.com/discourse/discourse-slack-official/pull/29)

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

---

<div class="post-metadata">

### 作者： ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### 发布日期： [2017 年4 月 11 日 12:54 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/9 "2017-04-11T12:54:53Z")

</div>

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

---

<div class="post-metadata">

### 作者： ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### 发布日期： [2017 年4 月 11 日 12:57 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/10 "2017-04-11T12:57:04Z")

</div>

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

Edit: @mcwumbly PR updated 👍

---

<div class="post-metadata">

### 作者： ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### 发布日期： [2017 年4 月 19 日 13:50 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/11 "2017-04-19T13:50:11Z")

</div>

Thanks! this is now working great.

---

<div class="post-metadata">

### 作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### 发布日期： [2017 年4 月 19 日 20:01 UTC](https://meta.discourse.org/t/slack-official-plugin-sending-topics-from-staff-categories/49578/12 "2017-04-19T20:01:46Z")

</div>


