Again, I don’t think I’m following you. It might be helpful if you were more specific about what specifically what the requirement is.
When the browser sends a message to the consumer, the consumer receives the message via the WebsocketConsumer.receive method. If that’s the message that you want to modify, the “event” is the fact that the receive method has been called with the message that was sent. You can do anything you want to do to the message in that method.