aboutsummaryrefslogtreecommitdiffstats
path: root/warmachine/connections/slack.py
diff options
context:
space:
mode:
authorjason2016-08-18 13:16:29 -0600
committerjason2016-08-18 13:16:29 -0600
commit990e7d5d8ed67b198377dfbb1abce5e48e595b7c (patch)
tree0a332197c7f4211b2e0a432c0d89e4f18f2d1a00 /warmachine/connections/slack.py
parent5e43eca28650a762d7f889382ee833a458b380cc (diff)
downloadwarmachine-ng-990e7d5d8ed67b198377dfbb1abce5e48e595b7c.tar.gz
warmachine-ng-990e7d5d8ed67b198377dfbb1abce5e48e595b7c.zip
bug: disable messaging bots (from a bot) in slack
Diffstat (limited to 'warmachine/connections/slack.py')
-rw-r--r--warmachine/connections/slack.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/warmachine/connections/slack.py b/warmachine/connections/slack.py
index 2f1a249..79c80a2 100644
--- a/warmachine/connections/slack.py
+++ b/warmachine/connections/slack.py
@@ -97,6 +97,11 @@ class SlackWS(Connection):
97 destination = self.channel_name_to_id[destination.replace('#','')] 97 destination = self.channel_name_to_id[destination.replace('#','')]
98 else: 98 else:
99 _user = self.user_nick_to_id[destination] 99 _user = self.user_nick_to_id[destination]
100
101 # slack doesn't allow bots to message other bots
102 if self.user_map[_user]['is_bot']:
103 return
104
100 destination = self.get_dm_id_by_user(_user) 105 destination = self.get_dm_id_by_user(_user)
101 106
102 message = { 107 message = {