Consider showing a link preview so your users have an idea of what they're going to get when they click a link.
To enable the Link Preview extension, open your dashboard and explore the application for which you would like to enable link previews. In the extensions tab, enable Link Preview with a flick of a switch.
CometChat will attempt to extract the link headline, summary, thumbnail, and more then put this data exactly where you expect it – alongside the original message in the form of metadata. As a developer, it is then up to you what you do with this data.