Cannot watch multiple tags using slash command

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.

1 Like

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

1 Like

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.

1 Like

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?

5 Likes

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

Thanks @mcwumbly. Fixed with tests in

https://github.com/discourse/discourse-slack-official/commit/d0f039b8f1436f085fbe792f2308e5d02c2f0eff

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.

4 Likes

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

4 Likes