From 54a46a82376f9ac3ad32be5e364b974579a109a3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 14 Aug 2020 20:50:17 +0300 Subject: fixes #2518 (Jabber: double click on a conference bookmark doesn't raise its window) --- protocols/JabberG/src/jabber_bookmarks.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index b54731ed7a..f280d273e2 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -367,14 +367,20 @@ public: if (!mir_strcmpi(item->type, "conference")) { m_lvBookmarks.SetItemState(iItem, 0, LVIS_SELECTED); // Unselect the item - /* some hack for using bookmark to transport not under XEP-0048 */ + // some hack for using bookmark to transport not under XEP-0048 if (!strchr(item->jid, '@')) //the room name is not provided let consider that it is transport and send request to registration m_proto->RegisterAgent(nullptr, item->jid); else { + if (auto *pRoom = m_proto->ListGetItemPtr(LIST_CHATROOM, item->jid)) + if (pRoom->hContact != 0) { + Clist_ContactDoubleClicked(pRoom->hContact); + return; + } + char *room = NEWSTR_ALLOCA(item->jid); char *server = strchr(room, '@'); - *(server++) = 0; + *server++ = 0; if (item->nick && *item->nick) m_proto->GroupchatJoinRoom(server, room, item->nick, item->password); -- cgit v1.2.3