Skip to content

Fix bridge_with_irc #469

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

Merged
merged 3 commits into from
Jan 17, 2019
Merged

Fix bridge_with_irc #469

merged 3 commits into from
Jan 17, 2019

Conversation

rht
Copy link
Contributor

@rht rht commented Aug 13, 2018

This fixes #106.
Can be tested with

./irc-mirror.py --irc-server=irc.freenode.net --channel='#python-mypy' \
--nick-prefix='irc_mirror' \
--site="https://chat.zulip.org" --stream='test here' --topic='IRC' \
--user=<bot-email> --api-key=<bot-api-key>

Note the --stream arg is added here.

@zulipbot
Copy link
Member

Hello @rht, it seems like you have referenced #106 in your pull request description, but you have not referenced them in your commit message description(s). When you reference an issue in a commit message, it automatically closes the corresponding issue when the commit is merged.

Please run git commit --amend in your command line client to amend your commit message description with Fixes #106..

An example of a correctly-formatted commit:

commit fabd5e450374c8dde65ec35f02140383940fe146
Author: zulipbot
Date:   Sat Mar 18 13:42:40 2017 -0700

    pull requests: Check PR commits reference when issue is referenced.

    Fixes #51.

Thank you for your contributions to Zulip!

@rht
Copy link
Contributor Author

rht commented Aug 13, 2018

A test bridge between #python-mypy on irc.freenode.net and https://chat.zulip.org/#narrow/stream/7-test-here/topic/IRC has been made.

@rht rht force-pushed the aio-irc2 branch 5 times, most recently from d1be3b4 to 11d9a14 Compare August 13, 2018 07:52
@rht
Copy link
Contributor Author

rht commented Aug 13, 2018

One more test bridge with #git on https://chat.zulip.org/#narrow/stream/161-IRC/topic/IRC https://chat.zulip.org/#narrow/stream/161-IRC/topic/.23git (specifying topic name will be added later after this is merged added anyway).

@zulipbot zulipbot added size: XL and removed size: L labels Dec 16, 2018
@rht rht force-pushed the aio-irc2 branch 2 times, most recently from 9f7c1a8 to df1f94a Compare December 17, 2018 04:46
@iweiss iweiss mentioned this pull request Jan 14, 2019
is_a_stream = msg["type"] == "stream"
if is_a_stream:
in_the_specified_stream = msg["display_recipient"] == self.stream
at_the_specified_subject = msg["subject"] == self.topic
Copy link
Member

Choose a reason for hiding this comment

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

topic comparisons in Zulip should be case-insensitive, can you fix this comparison?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed via casefold() method, which handles unicode chars additionally instead of just lower().

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In zulip/zulip:

zerver/lib/topic.py
156:        canonical_name = topic_name.lower()

This should have been casefold() as well.

@timabbott
Copy link
Member

I merged most of this, and posted a comment (which impacts the last few commits in a small way).

@timabbott
Copy link
Member

Looks great, merged, thanks @rht!

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

Successfully merging this pull request may close these issues.

Improve IRC Gateway
3 participants