Cannot watch multiple tags using slash command


(Dave McClure) #1

If you try to use the /discourse slash command to watch multiple tags with the official slack plugin, it doesn’t work.

After doing the following:

/discourse watch tag:foo
Watched tag foo

/discourse watch tag:bar
Watched tag bar

When you look in the admin page for the plugin, you can see that the channel is only subscribed to the bar tag.


(Alan Tan) #2

@vinothkannans I think we should support something like tag:foo,bar,..


(Dave McClure) #3

For categories, if I watch one, and then another, I now am watching the union of those two categories. I think it should work the same way for tags. So, for instance, in the example in the OP, I should now be watching both the foo and bar tags.

In addition to doing this for the sake of consistency with the UX for categories, consider this case:

User A uses some combination of slack commands to watch 7 particular tags in a given channel.

A month later, User B thinks the channel should also watch some 8th tag.

If they just do /discourse watch tag:number8, it’d be unfortunate if that silently destroyed the work of User A from a month before.

There should probably be a command to un(watch|follow|mute) tags and categories explicitly instead if you want to stop watching any of those first 7 tags.


How does Mute interact with other subscription types in the official slack plugin?
Slack command to un(watch|follow|mute) tag or category
(Jeff Atwood) #4

Our current design makes zero sense if it is overwriting every time, as already pointed out, nobody would expect that once you watch a category all previous category watches are erased. Why would we allow that for tags?


(Vinoth Kannan) #5

@tgxworld that’s why I didn’t update tags here. It will overwrite existing tags list while processing slack command. May be you missed it while merging. Shall I make PR? Or is there any other option or best practice?

Else particularly for slack commands we should do append behavior instead of updating.


(Alan Tan) #6

Thanks @mcwumbly. Fixed with tests in

I think you’re looking at the wrong spot. That comment in the link is referring to DiscourseSlack::Slack.delete_filter where it broke because it was only matching against tags and not the channel.


(Dave McClure) #7

Just tested this out and it’s working great, thanks!


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