From 9b89a5188a8658f91d325947f231b98d08348bce Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Thu, 7 Jun 2018 13:12:42 +0200 Subject: Use users list to check if user info should be fetched This is probably more reliable than depending on the topic not being set. --- wee_slack.py | 4 +--- 1 file changed, 1 insertion(+), 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) -- cgit