I know it is pretty confusing, but you have to understand that when broadcasting, you have to get rid of current_user. I had hard time too with that. Here is another way of thinking about it.
Imagine a new message broadcasted to the author and 6 other users. When Rails render the _message partial, it knows who is the author (current_user), but don’t know about the other 6 users. It will broadcast to the author and the 6 other users the same rendered partial, with the edit link showed.
Best way to avoid that is to have partial not relying on current_user at all. If you absolutely need to render the message with stuffs linked to each user seeing it, you can send tell the browser to load the new message via a fetch request