aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-06-07 13:12:42 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2018-06-07 14:45:55 +0200
commit9b89a5188a8658f91d325947f231b98d08348bce (patch)
tree1b96954e05dddbc4627223a6b5609caa37f35113 /wee_slack.py
parent7c9afee412a0c328578faa9b1120e453ec5a1f1a (diff)
downloadwee-slack-9b89a5188a8658f91d325947f231b98d08348bce.tar.gz
Use users list to check if user info should be fetched
This is probably more reliable than depending on the topic not being set.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 95b11dd..f61168e 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1664,9 +1664,7 @@ class SlackDMChannel(SlackChannel):
def set_related_server(self, team):
super(SlackDMChannel, self).set_related_server(team)
- # If the topic hasn't been set then the user is external and needs to
- # be fetched
- if not self.topic:
+ if self.user not in self.team.users:
s = SlackRequest(self.team.token, 'users.info', {'user': self.slack_name}, team_hash=self.team.team_hash, channel_identifier=self.identifier)
self.eventrouter.receive(s)