aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--warmachine/connections/slack.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/warmachine/connections/slack.py b/warmachine/connections/slack.py
index 5556abd..26113b9 100644
--- a/warmachine/connections/slack.py
+++ b/warmachine/connections/slack.py
@@ -74,6 +74,12 @@ class SlackWS(Connection):
74 return 74 return
75 75
76 self.log.debug('new slack message: {}'.format(message)) 76 self.log.debug('new slack message: {}'.format(message))
77
78 # Sometimes there isn't a type in the message we receive
79 if 'type' not in message:
80 self.log.error('Received typeless message: {}'.format(message))
81 return
82
77 if message['type'] == 'message' and 'subtype' not in message: 83 if message['type'] == 'message' and 'subtype' not in message:
78 # Handle text messages from users 84 # Handle text messages from users
79 return await self.process_message(message) 85 return await self.process_message(message)