From bfedb65640a3ef6625ca4619a97835a738b95786 Mon Sep 17 00:00:00 2001 From: Richard Connon Date: Thu, 5 May 2016 16:25:58 +0100 Subject: Added process_group_join, process_group_leave and process_group_topic that pass to their channel equivalents --- wee_slack.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/wee_slack.py b/wee_slack.py index 62f790f..a792d48 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1477,6 +1477,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) @@ -1649,7 +1661,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) -- cgit