I am not familiar to version you use but
if you cannot see message button then try changing class
from "fas fa -times to "fa fa-times" meaning remove the "s" letter.
other than this you need to send AJAX request to delete message
example and not forgot to exit at the end of ajax..
Why do I think that?
When I changed this file and copy @Ala code - I can't deleted received messages. Change of this file breake trash button(he is not clickable)
In normal - error with only sent message. And that's what I want to fix