diff options
author | George Hazan <ghazan@miranda.im> | 2020-08-14 20:50:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-08-14 20:50:17 +0300 |
commit | 54a46a82376f9ac3ad32be5e364b974579a109a3 (patch) | |
tree | 5c729c8208e5ee80d9a02b4333451bbdca9a73b5 /protocols/JabberG | |
parent | 92dee4809d57f97421578a4421e7d9745c369f9a (diff) |
fixes #2518 (Jabber: double click on a conference bookmark doesn't raise its window)
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_bookmarks.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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);
|