diff options
author | Ryan Huber <rhuber@gmail.com> | 2017-02-04 12:55:29 -0800 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2017-02-04 12:55:29 -0800 |
commit | f0108a584f48e951212f58199e466e2fa6fba0e2 (patch) | |
tree | 21188587f8fbb62ee62160beb7954cb7cece5aa4 | |
parent | 7d04ad45305a3067ef19c77d4feabe5e54bda53b (diff) | |
download | wee-slack-f0108a584f48e951212f58199e466e2fa6fba0e2.tar.gz |
make team buffer work properly
-rw-r--r-- | wee_slack.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/wee_slack.py b/wee_slack.py index dd1a192..f17c7f6 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -561,21 +561,22 @@ class SlackTeam(object): incomplete Team object under which users and channels live.. Does lots. """ - def __init__(self, eventrouter, token, team, nick, myidentifier, users, bots, channels): + def __init__(self, eventrouter, token, subdomain, nick, myidentifier, users, bots, channels): self.state = "disconnected" self.ws = None self.ws_counter = 0 self.ws_replies = {} self.eventrouter = eventrouter self.token = token - self.team = team - self.domain = team + ".slack.com" + self.team = self + self.subdomain = subdomain + self.domain = subdomain + ".slack.com" self.nick = nick self.myidentifier = myidentifier self.channels = channels self.users = users self.bots = bots - self.team_hash = str(sha.sha("{}{}".format(self.nick, self.team)).hexdigest()) + self.team_hash = str(sha.sha("{}{}".format(self.nick, self.subdomain)).hexdigest()) self.name = self.domain self.server_buffer = None self.got_history = True @@ -587,7 +588,7 @@ class SlackTeam(object): # Last step is to make sure my nickname is the set color self.users[self.myidentifier].force_color(w.config_string(w.config_get('weechat.color.chat_nick_self'))) def __eq__(self, compare_str): - if compare_str == self.token or compare_str == self.domain or compare_str == self.team: + if compare_str == self.token or compare_str == self.domain or compare_str == self.subdomain: return True else: return False |