diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-05-14 06:43:43 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-05-14 06:43:43 -0700 |
commit | 86034dbac2b0afeb271132ca887b89ea32cc403f (patch) | |
tree | 8f4c8279ba1c08250783ce5c11ee0f62f4df3815 /wee_slack.py | |
parent | aa1fab01b86ce2878b3627a18d234eeea971db9b (diff) | |
download | wee-slack-86034dbac2b0afeb271132ca887b89ea32cc403f.tar.gz |
fix new channels registration
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py index dcc7dd9..5c52377 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # + from functools import wraps import time import json @@ -1073,7 +1074,7 @@ def process_channel_created(message_json): server.channels.find(message_json["channel"]["name"]).open(False) else: item = message_json["channel"] - server.channels.append(Channel(server, item["name"], item["id"], item["is_open"], item["last_read"], "#", item["members"], item["topic"])) + server.channels.append(Channel(server, item["name"], item["id"], item["is_open"], item["last_read"], "#", item["members"], item["topic"]["value"])) server.buffer_prnt("New channel created: {}".format(item["name"])) @@ -1100,7 +1101,7 @@ def process_channel_joined(message_json): server.channels.find(message_json["channel"]["name"]).open(False) else: item = message_json["channel"] - server.channels.append(Channel(server, item["name"], item["id"], item["is_open"], item["last_read"], "#", item["members"], item["topic"])) + server.channels.append(Channel(server, item["name"], item["id"], item["is_open"], item["last_read"], "#", item["members"], item["topic"]["value"])) def process_channel_leave(message_json): @@ -1120,7 +1121,7 @@ def process_group_joined(message_json): server.channels.find(message_json["channel"]["name"]).open(False) else: item = message_json["channel"] - server.channels.append(GroupChannel(server, item["name"], item["id"], item["is_open"], item["last_read"], "#", item["members"], item["topic"])) + server.channels.append(GroupChannel(server, item["name"], item["id"], item["is_open"], item["last_read"], "#", item["members"], item["topic"]["value"])) def process_im_close(message_json): |