-
Notifications
You must be signed in to change notification settings - Fork 130
Subteam mentions #64
base: master
Are you sure you want to change the base?
Subteam mentions #64
Conversation
Put type back as the single character, and add a subtype match, which does not include the carat.
@paulhammond Does this seem like a reasonable approach? hubot-slack doesn't seem to do this yet. |
Perhaps the pattern for the subtype should be (Also: Hi, @paulhammond.) |
Hi! So this command is documented at https://api.slack.com/docs/formatting:
I can tell you that the the subteam IDs will always be alphanumeric in this case. So your code will handle the subteam command just fine. But I think it's worth drawing your attention to the next paragraph in the docs where we say we might be adding new commands in the future (where commands are things starting with a Here's a test case that includes most of the edge cases you might need to consider: (Oh and I'm moving onto a different team at Slack in the near future. Jimmy, I'll introduce you to some other people on the platform team who can help you with these kinds of questions from here on) |
Thanks very much, Paul! |
@jimmycuadra I just discovered that we’re pinned to my branch for this PR, and we need some of the newer features. I’m going to resurrect it and attempt to handle @paulhammond’s example case above. I’ll review the updated docs, but is there anything you know I need to watch out for? EDIT: Looks like the one I should specifically test is dates. (Also, this should fix #124) |
Wow, it’s been a while! Yes, the thing we were about to launch that I was referring to above was |
… commands like <!date…> commands as well as @paulhammond’s generic example (that was probably hinting at <!date…>)
@jimmycuadra I opted to swap values in a few conditionals after the regexp replace in favor of making the regexp quite a bit more complex trying to get them right with lookaheads. I think that would likely make the regexp inscrutable. Let me know if you’d prefer it that way. |
Hmm. That spec also failed locally, but was far away from my changes, and I presumed it was my environment. I’ll take a quick look at it to see if I can figure out why it is failing. (I suspect it’s something to do with a newer version of EventMachine) |
The spec fails non-deterministically. |
Slack supports links to user-groups/sub-teams, of the form:
<!subteam^link|@team_name>
. This seems to be the least invasive method to support this in a way that has a chance of supporting similar links in the future.Thanks!