aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2016-04-04 19:49:32 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2016-04-04 19:50:25 +0200
commit602fa9c2865d4708958b90f772df2744134a2fb4 (patch)
tree8f14f93db195e5a1df9de82404fddcdc547952c5 /wee_slack.py
parent3c4a7f0fcd64aabb3a2400108963035dfe7a0740 (diff)
downloadwee-slack-602fa9c2865d4708958b90f772df2744134a2fb4.tar.gz
Take alias into account for server localvar
If server.alias is set, use that for the server localvar. Otherwise, use server.team.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index f2f49c2..68cfbc2 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -421,8 +421,11 @@ class Channel(object):
w.buffer_set(self.channel_buffer, "localvar_set_type", 'private')
else:
w.buffer_set(self.channel_buffer, "localvar_set_type", 'channel')
+ if self.server.alias:
+ w.buffer_set(self.channel_buffer, "localvar_set_server", self.server.alias)
+ else:
+ w.buffer_set(self.channel_buffer, "localvar_set_server", self.server.team)
w.buffer_set(self.channel_buffer, "localvar_set_channel", self.name)
- w.buffer_set(self.channel_buffer, "localvar_set_server", self.server.team)
w.buffer_set(self.channel_buffer, "short_name", self.name)
buffer_list_update_next()