The block user link in a message is built directly in the preprocess hook and the anchor markup is hardcoded in the template:
<a id="privatemsg-block-user-{{ block_user_id }}" class="privatemsg-block-user use-ajax" href="{{ block_user }}">{{ block_user_text }}</a>
This makes it impossible for other modules to change the link (for example to add a confirmation dialog instead of the instant toggle, or to use a different blocking storage). The only workaround today is to override the whole privatemsg-message.html.twig template and duplicate the link conditions, which breaks on every module update.
Issue fork privatemsg-3635778
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
ivnish