fjaros / wowchat

WoWChat is a clientless Discord integration chat bot for old versions of World of Warcraft.
GNU General Public License v3.0
139 stars 96 forks source link

Filter not working for Green System Messages #35

Closed virtualbjorn closed 3 years ago

virtualbjorn commented 3 years ago

Unable to filter messages in Green color image Players can now make use of an opt-in feature: Mercenary Mode that allows you to briefly forget your faction allegiance and fight for the enemy. This feature can be toggled within the account settings on the website.

Able to filter Yellow System messages only the green system messages aren't filtered. Here's my filter setup image

virtualbjorn commented 3 years ago

I did some debugging and here's what I found image 1st log is for parsedLinks 2nd log is for parsedResolvedTags 3rd log is for message image From these lines we're passing in a raw message instead of the parsed ones.

fjaros commented 3 years ago

Hey there. Yep this is known behavior. At the time I was thinking that it might be unclear if there is some post-processing done on the bot (such as translating Discord @name tags and emojis and links) that might cause filters to be missed or wrongly applied. I thought it might be a better user experience to do it on the original message. Of course, I missed the part where messages can contain colors and things like that which will be unclear to the user on both wow and Discord since the bot removes such things before posing the message to Discord.

I agree the user experience is bad and filtering probably should be done on the post-processed message rather than the original. Thankfully it's an easy change.

virtualbjorn commented 3 years ago

I modified my local setup using the processed message and it works fine. Thanks for the great work though.

Appreciate this mod so much. Better communication for guildies.

fjaros commented 3 years ago

Fixed in https://github.com/fjaros/wowchat/commit/c3a4af0f264227b402b51e32bd3bc06a435c127d