final IRosterManager rosterManager = presenceContainerAdapter.getRosterManager();
if (chatManager != null && rosterManager != null) {
try {
// get local ID
final XMPPID localID = (XMPPID) rosterManager.getRoster().getUser().getID();
final Namespace ns = container.getConnectNamespace();
// create target ID
final XMPPID targetID = (isXMPPS) ? new XMPPSID(ns, getURI().getAuthority()) : new XMPPID(ns, getURI().getAuthority());
// If they are same, just tell user and return
if (localID.equals(targetID)) {
MessageDialog.openError(null, Messages.XMPPHyperlink_MESSAGING_ERROR_TITLE, Messages.XMPPHyperlink_MESSAGING_ERROR_MESSAGE);