From fb263f2fcc50beac90846ca757b7324c5e7a0049 Mon Sep 17 00:00:00 2001 From: csoler Date: Thu, 29 Dec 2011 08:40:23 +0000 Subject: [PATCH] fixed duplication of messages in ChatLobbyDialog git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4744 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/services/p3chatservice.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/services/p3chatservice.cc b/libretroshare/src/services/p3chatservice.cc index e80f193d1..d7980a7d4 100644 --- a/libretroshare/src/services/p3chatservice.cc +++ b/libretroshare/src/services/p3chatservice.cc @@ -493,8 +493,10 @@ void p3ChatService::checkAndRedirectMsgToLobby(RsChatMsgItem *ci) vpeer_id = it->second.virtual_peer_id ; } - recvLobbyChat(lobbyItem) ; // needs the proper peerId - ci->PeerId(vpeer_id) ; // thenthe peer Id is changed to the lobby id (virtual peer id). + if(recvLobbyChat(lobbyItem)) + ci->PeerId(vpeer_id) ; // the peer Id is changed to the lobby id (virtual peer id). + else + ci->PeerId(std::string()) ; // reset the peer id to prevent display of message. }