diff options
author | Ryan Huber <rhuber@gmail.com> | 2016-06-17 08:01:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-17 08:01:34 -0700 |
commit | 6664f5ebd6aea1d0f308996ff8ddd51842226388 (patch) | |
tree | 1daa68eb6fdfb98761b7dd1acd1ff4fb0e14892d /wee_slack.py | |
parent | c93d03925fb2d0c3fbb6c48309e9570c71e392be (diff) | |
parent | bfedb65640a3ef6625ca4619a97835a738b95786 (diff) | |
download | wee-slack-6664f5ebd6aea1d0f308996ff8ddd51842226388.tar.gz |
Merge pull request #226 from irconan/group_subtypes
Added process_group_join, process_group_leave and process_group_topic
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 7f3900a..072b06c 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1486,6 +1486,18 @@ def process_channel_archive(message_json): channel.detach_buffer() +def process_group_join(message_json): + process_channel_join(message_json) + + +def process_group_leave(message_json): + process_channel_leave(message_json) + + +def process_group_topic(message_json): + process_channel_topic(message_json) + + def process_group_left(message_json): server = servers.find(message_json["_server"]) server.channels.find(message_json["channel"]).close(False) @@ -1663,7 +1675,7 @@ def render_message(message_json, force=False): def process_message(message_json, cache=True): try: # send these subtype messages elsewhere - known_subtypes = ["message_changed", 'message_deleted', 'channel_join', 'channel_leave', 'channel_topic', 'bot_enable', 'bot_disable'] + known_subtypes = ["message_changed", 'message_deleted', 'channel_join', 'channel_leave', 'channel_topic', 'group_join', 'group_leave', 'group_topic', 'bot_enable', 'bot_disable'] if "subtype" in message_json and message_json["subtype"] in known_subtypes: proc[message_json["subtype"]](message_json) |