From 27bedf8414923b9b93f88c3456e4d06e7a2b38d9 Mon Sep 17 00:00:00 2001 From: Phenom Date: Tue, 1 Aug 2017 10:15:42 +0200 Subject: [PATCH] Fix Lobby auto-subscribe. Don't remove auto-subscribe if we cannot get gxsId detail. But what happens if the id is removed? --- libretroshare/src/chat/distributedchat.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libretroshare/src/chat/distributedchat.cc b/libretroshare/src/chat/distributedchat.cc index 40f62fbe91..29409a4ecf 100644 --- a/libretroshare/src/chat/distributedchat.cc +++ b/libretroshare/src/chat/distributedchat.cc @@ -577,14 +577,18 @@ void DistributedChatService::handleRecvChatLobbyList(RsChatLobbyListItem *item) } RsIdentityDetails idd ; - if(IS_PGP_SIGNED_LOBBY(flags) - && (!rsIdentity->getIdDetails(gxsId,idd) - || !(idd.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED)) ) + if(!rsIdentity->getIdDetails(gxsId,idd)) + std::cerr << "(EE) Lobby auto-subscribe: Can't get Id detail for:" << gxsId.toStdString().c_str() << std::endl; + else { - std::cerr << "(EE) Attempt to auto-subscribe to signed lobby with non signed Id. Remove it." << std::endl; - setLobbyAutoSubscribe(*it, false); - } else { - joinVisibleChatLobby(*it,gxsId); + if(IS_PGP_SIGNED_LOBBY(flags) + && !(idd.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED) ) + { + std::cerr << "(EE) Attempt to auto-subscribe to signed lobby with non signed Id. Remove it." << std::endl; + setLobbyAutoSubscribe(*it, false); + } else { + joinVisibleChatLobby(*it,gxsId); + } } }