So, you don't want the current user who clicked on that link to send the message, but receive a message in a chat window, right?
But then...
- ...who would send that message?
- ...why can't you just display a toast when the user clicks that link, and make the site open when the user clicks the toast?
- ...why can't you just make a link do what a link is supposed to do: open a web page?
I think your logic simply doesn't work.
By the way, it's not possible that you see a message in a chat window without having your contact see it too, whether that contact sent or received that message!