zulip / python-zulip-api

Python library for the Zulip API.
https://zulip.com/api/
Apache License 2.0
354 stars 355 forks source link

bridge_with_irc: Check if Zulip bot is subscribed to stream before starting IRC bot. #542

Closed orientor closed 4 years ago

orientor commented 4 years ago

Use list_subscriptions method of zulip client to get list of subscriptions and then check whether given stream has been subscribed to or not. Start IRC bot only if subcribed.

Solves #500 .

rht commented 4 years ago

@timabbott this PR is a duplicate of #505 which is essentially the same thing but expressed more succinctly.

I think we could check this more efficiently by just parsing the result of a /register call, rather than doing a separate query for this.

I can't think of a way other than making a post to /register with a narrow to the said stream name. This is again, yet another separate query.

rht commented 4 years ago

This PR can be closed since #505 has been merged.

orientor commented 4 years ago

@rht closed.