From 47a4f258d710af3e4564933274afc06ef8ad19b0 Mon Sep 17 00:00:00 2001 From: rht Date: Fri, 24 Jul 2020 23:59:49 -0400 Subject: [PATCH] slack-bridge: Update processing of members list according to new API. --- zulip/integrations/bridge_with_slack/run-slack-bridge | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zulip/integrations/bridge_with_slack/run-slack-bridge b/zulip/integrations/bridge_with_slack/run-slack-bridge index 919763f..53d630c 100755 --- a/zulip/integrations/bridge_with_slack/run-slack-bridge +++ b/zulip/integrations/bridge_with_slack/run-slack-bridge @@ -75,7 +75,7 @@ class SlackBridge: def run_slack_listener(self) -> None: # spawn a non-websocket client for getting the users list _wc = slack.WebClient(token=self.slack_config["token"]) - members = _wc.users_list() + members = _wc.users_list()['members'] # See also https://api.slack.com/changelog/2017-09-the-one-about-usernames self.slack_id_to_name = {u["id"]: u["profile"].get("display_name", u["profile"]["real_name"]) for u in members} self.slack_name_to_id = {v: k for k, v in self.slack_id_to_name.items()}