aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2014-10-27 14:24:08 -0700
committerRyan Huber <rhuber@gmail.com>2014-10-27 14:24:08 -0700
commit7f2794ee814607b4b113c914e34683ef833fc65e (patch)
tree3e7f09af6ba2668d2a7505b8afd72ef8a8f8410f /wee_slack.py
parentf58ad9b9dac6860a8309145c4182911ae8760f89 (diff)
downloadwee-slack-7f2794ee814607b4b113c914e34683ef833fc65e.tar.gz
fix channel_joined
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 6d8a15c..6a955cc 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -656,6 +656,14 @@ def process_channel_join(message_json):
channel = server.channels.find(message_json["channel"])
channel.user_join(message_json["user"])
+def process_channel_joined(message_json):
+ server = servers.find(message_json["myserver"])
+ if server.channels.find(message_json["channel"]["name"]):
+ 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"], "#"))
+
def process_channel_leave(message_json):
server = servers.find(message_json["myserver"])
channel = server.channels.find(message_json["channel"])