File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
zulip/integrations/bridge_with_slack Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -53,11 +53,17 @@ class SlackBridge:
5353 }
5454
5555 # zulip-specific
56- self .zulip_client = zulip .Client (
57- email = self .zulip_config ["email" ],
58- api_key = self .zulip_config ["api_key" ],
59- site = self .zulip_config ["site" ],
60- )
56+ def zulip_client_constructor () -> zulip .Client :
57+ return zulip .Client (
58+ email = self .zulip_config ["email" ],
59+ api_key = self .zulip_config ["api_key" ],
60+ site = self .zulip_config ["site" ],
61+ )
62+
63+ self .zulip_client = zulip_client_constructor ()
64+ # Temporary workaround until
65+ # https://github.com/zulip/python-zulip-api/issues/761 is fixed.
66+ self .zulip_client_constructor = zulip_client_constructor
6167
6268 # slack-specific
6369 self .slack_client = rtm
@@ -121,7 +127,7 @@ class SlackBridge:
121127 subject = zulip_endpoint ["topic" ],
122128 content = content ,
123129 )
124- self .zulip_client .send_message (msg_data )
130+ self .zulip_client_constructor () .send_message (msg_data )
125131
126132 self .slack_client .start ()
127133
You can’t perform that action at this time.
0 commit comments