diff options
author | Ryan Huber <rhuber@gmail.com> | 2016-03-11 15:45:26 +0000 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2016-03-11 15:45:26 +0000 |
commit | d5bb96beb3c3c00d3bc8230c4927e176c69c9771 (patch) | |
tree | 214d44fd759914ab5715354d183a4669ccdf55a9 /wee_slack.py | |
parent | 602ecac2b09aaa616361f37f7036e2816cab1f11 (diff) | |
parent | e63e11ffd40bb8e733d236ec096a90c1bc280fd0 (diff) | |
download | wee-slack-d5bb96beb3c3c00d3bc8230c4927e176c69c9771.tar.gz |
Merge pull request #173 from rawdigits/query-and-server_alias
Make /slack talk and friends work when server_alias is set
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index c258fb4..46643ec 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -147,6 +147,7 @@ class SlackServer(object): self.communication_counter = 0 self.message_buffer = {} self.ping_hook = None + self.alias = None self.identifier = None self.connect_to_slack() @@ -175,7 +176,7 @@ class SlackServer(object): channels.append(channel, channel.get_aliases()) def get_aliases(self): - aliases = [self.identifier, self.token, self.buffer] + aliases = filter(None, [self.identifier, self.token, self.buffer, self.alias]) return aliases def find(self, name, attribute): @@ -219,6 +220,7 @@ class SlackServer(object): alias = w.config_get_plugin("server_alias.{}".format(login_data["team"]["domain"])) if alias: self.server_buffer_name = alias + self.alias = alias else: self.server_buffer_name = self.domain |