grubeninspekteur / BetterRBTV

Web extension for YouTube Live chats.
MIT License
21 stars 6 forks source link

Possible Bug: Muted users can still @mention #34

Closed DoomDesign closed 8 years ago

DoomDesign commented 8 years ago

A few moments ago, a possible bug was mentioned in the chat: When a user is blocked/muted for you, he can still @mention you and his message will be visible for you. Is this intended behaviour? Or a bug that needs further research?

DoomDesign commented 8 years ago

Okay, I guess I found out why this happens. In all my code for @mentions (Sound notification, desktop popups, fixed mentions ... ) I have to add a check if the user is on the muted list, and then return or remove the notification!

grubeninspekteur commented 8 years ago

Alternatively, we could pull user_filters.js up and then check whether the element has been removed:

$.contains(document.documentElement, $foo.get(0))

see http://stackoverflow.com/questions/3086068/how-do-i-check-whether-a-jquery-element-is-in-the-dom

Saves you the headache of synchronizing muted user lists ;)

DoomDesign commented 8 years ago

Yes, would be possible, too. That's what I thought in the first place when I wrote that addons; that messages from muted users aren't considered valid for anything else anymore. As long as we keep .remove-ing them (and not just hiding via CSS, but even then we could check that), or rather, as long as our way of muting is consistent I can implement everything ;)