added method to open a chat window for a peer, link detection before sending messages