Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix bug that prevented messages via patternchannel from getting sent #11
This bug occured when a user sent a message to a channel that was pattern
zvyn left a comment •
Looks good, just a
EDIT: Oh and please rebase to master, I added GitHub Actions testing in Python 3.5 and Python 3.6 to verify compatibility.
This bug occured when a user sent a message to a channel that was pattern subscribed to. Then, the _handle_get_command function would return None as the channel that was requested was not in the allowed channel names. This was fixed by adding a check that returned True if the channel_name appeared in the channel_patterns, thus passing that first test in _handle_get_command
This led to the discovery of a bug in this bugfix. It has been fixed by discarding the last char of channel_patterns (always a literal `*`). Now the _channels_in_patterns function actually returns True if it matches. This was not discovered before because of the missing `not` statement.