Skip to content
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

FIX charset=None was causing SubscriberProtocol.messageReceived to ne… #150

Merged
merged 2 commits into from Jul 6, 2023

Conversation

EllieTheYeen
Copy link
Contributor

This will fix the issue where charset if set to None would cause SubscriberProtocol .messageReceived to never be called

If the charset = None in SubscriberProtocol then SubscriberProtocol .replyReceived will never call SubscriberProtocol.messageReceived due to u"message" when received will not match b"message" and u"pmessage" will not match b"pmessage" inside the if clauses therefore the code where messageReceived is called will never be reached. This is due to types of str and bytes will not match each other even if similar values are inside

…ver be called

If the charset = None in SubscriberProtocol then SubscriberProtocol .replyReceived will never call SubscriberProtocol.messageReceived due to u"message" when received will not match b"message" and u"pmessage" will not match b"pmessage" inside the if clauses therefore the code where messageReceived is called will never be reached. This is due to types of str and bytes will not match each other even if similar values are inside
@IlyaSkriblovsky
Copy link
Owner

Thank you! Good catch.

Is it ready? Did you test it to be sure it works properly now with empty charset?

@EllieTheYeen
Copy link
Contributor Author

I have tested what I could and it seems to work great at the moment in the applications where I use it and I have not found any problems yet

@IlyaSkriblovsky IlyaSkriblovsky merged commit 44e0dec into IlyaSkriblovsky:master Jul 6, 2023
@IlyaSkriblovsky
Copy link
Owner

Thank you!

Could you please add yourself to CONTRIBUTORS.md ?

@EllieTheYeen
Copy link
Contributor Author

Is it really important since I would rather not put my real name and email address in places?

@IlyaSkriblovsky
Copy link
Owner

Of course not! You can put any kind of nickname without an email if you want to or not put anything at all. It's totally up to you.

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.

None yet

2 participants