When the code was updated 4f6bc49
to provide a cleaner interface to the source_room_id it removed a critical check to see if source_room_id is even provided in the first place.
Specifically the loss of
if "source-room-id" in command._parsed["tags"]:
means that when shared chat is not active and twitch does not set any source-room-id tag the check of
if command.source_room_id != command.room.room_id:
is now a comparison of None != '12345' which is True, and thus returning False to the caller of SharedChatOnlyCurrent.can_execute.
Of note this middleware is not required when the Chat parameter of no_shared_chat_messages is True (the default) because that check is happening before command processing.
https://github.com/Teekeks/pyTwitchAPI/blob/master/twitchAPI/chat/__init__.py#L1108-L1110
When the code was updated 4f6bc49
to provide a cleaner interface to the
source_room_idit removed a critical check to see ifsource_room_idis even provided in the first place.Specifically the loss of
means that when shared chat is not active and twitch does not set any
source-room-idtag the check ofis now a comparison of
None != '12345'which isTrue, and thus returningFalseto the caller ofSharedChatOnlyCurrent.can_execute.Of note this middleware is not required when the
Chatparameter ofno_shared_chat_messagesisTrue(the default) because that check is happening before command processing.https://github.com/Teekeks/pyTwitchAPI/blob/master/twitchAPI/chat/__init__.py#L1108-L1110