aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRichard Connon <richard@connon.me.uk>2016-05-05 16:25:58 +0100
committerRichard Connon <richard@connon.me.uk>2016-05-05 18:07:23 +0100
commitbfedb65640a3ef6625ca4619a97835a738b95786 (patch)
treed552dd733d64f55968139b0cd57800d6272c2166 /wee_slack.py
parentb7b6f7dec92463810548c5760c7cbbddee0c1418 (diff)
downloadwee-slack-bfedb65640a3ef6625ca4619a97835a738b95786.tar.gz
Added process_group_join, process_group_leave and process_group_topic
that pass to their channel equivalents
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py14
1 files changed, 13 insertions, 1 deletions
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)