From 602fa9c2865d4708958b90f772df2744134a2fb4 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 4 Apr 2016 19:49:32 +0200 Subject: Take alias into account for server localvar If server.alias is set, use that for the server localvar. Otherwise, use server.team. --- wee_slack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'wee_slack.py') 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() -- cgit