Here's something that might help others. On Whatsapp groups some users can become obnoxious, and one can fall into the trap of responding to their trolling. Yet AFAIK it's impossible to hide contributions from a given user in a group; one can only leave the group.
When using WhatsApp in the browser, a uBlock filter can hide contributions from a given user like this:
web.whatsapp.com##div.message-in:has(div.copyable-text[data-pre-plain-text*="name_of_user"])
This hides text messages (even successive ones where the username isn't displayed) but doesn't hide messages with only images or other media. For those it's more difficult as the username is in a span that has no consistent characteristics; the username has to be unique and complete in order to not trigger false positives.Or maybe there's a better way. Suggestions welcome.