Skip to content

integrations: Fix IRC <-> Zulip bridge? #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

sbansal1999
Copy link
Owner

No description provided.

# Make sure the bot is subscribed to the stream
self.check_subscription_or_die()
# Initialize IRC bot after proper connection to Zulip server has been confirmed.
irc.bot.SingleServerIRCBot.__init__(self, [(server, port)], nickname, nickname)
irc.bot.SingleServerIRCBot.__init__(self, [(server, port)], nickname, nickname, sasl_login)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried passing sasl_login as keyword argument and have updated the code.

But the following error occurs:

Traceback (most recent call last):
  File "/home/sbansal1999/p/python-zulip-api/zulip/integrations/bridge_with_irc/irc-mirror.py", line 70, in <module>
    bot.start()
  File "/srv/zulip-py3-venv/lib/python3.10/site-packages/irc/bot.py", line 347, in start
    self._connect()
  File "/srv/zulip-py3-venv/lib/python3.10/site-packages/irc/bot.py", line 187, in _connect
    self.connect(
  File "/home/sbansal1999/p/python-zulip-api/zulip/integrations/bridge_with_irc/irc_mirror_backend.py", line 47, in connect
    self.c = self.reactor.loop.run_until_complete(self.connection.connect(*args, **kwargs))
TypeError: AioConnection.connect() got an unexpected keyword argument 'sasl_login'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's because the SASL PR is possibly implemented only for the sync client. Try reverting zulip@910f83e.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That actually doesn't make sense. The AioConnection is a subclass of ServerConnection. jaraco/irc#199 modifies ServerConnection. So the AioConnection should accept sasl_login.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants