Why not a https://docs.moodle.org/en/Filter ?
(See also "How to add username to message" https://moodle.org/mod/forum/view.php?id=50)
Forum
Message from forum with displayed username
This discussion has been locked so you can no longer reply to it.