aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wee_slack.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 1b48348..631e24b 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3275,6 +3275,11 @@ def resolve_ref(ref):
channel = team.channels.get(ref[1:])
if channel:
return channel.name
+ elif ref.startswith('!subteam'):
+ _, subteam_id = ref.split('^')
+ subteam = team.subteams.get(subteam_id)
+ if subteam:
+ return '@{}'.format(subteam.handle)
# Something else, just return as-is
return ref