From fb0a7e01f0b2dd372de2575c21fb4ba705dfe834 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Tue, 9 Apr 2019 16:29:48 +0200 Subject: Support subteams in resolve_ref --- wee_slack.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'wee_slack.py') 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 -- cgit