mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
only send name changing events in lobby when the two nicknames are PGP-signed
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8380 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d69e03efd6
commit
20c3777d78
1 changed files with 18 additions and 13 deletions
|
@ -1631,25 +1631,30 @@ bool DistributedChatService::setIdentityForChatLobby(const ChatLobbyId& lobby_id
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
std::map<ChatLobbyId,ChatLobbyEntry>::iterator it;
|
std::map<ChatLobbyId,ChatLobbyEntry>::iterator it;
|
||||||
|
|
||||||
{
|
{
|
||||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
|
||||||
#ifdef DEBUG_CHAT_LOBBIES
|
#ifdef DEBUG_CHAT_LOBBIES
|
||||||
std::cerr << "Changing nickname for chat lobby " << std::hex << lobby_id << std::dec << " to " << nick << std::endl;
|
std::cerr << "Changing nickname for chat lobby " << std::hex << lobby_id << std::dec << " to " << nick << std::endl;
|
||||||
#endif
|
#endif
|
||||||
it = _chat_lobbys.find(lobby_id) ;
|
it = _chat_lobbys.find(lobby_id) ;
|
||||||
|
|
||||||
if(it == _chat_lobbys.end())
|
if(it == _chat_lobbys.end())
|
||||||
{
|
{
|
||||||
std::cerr << " (EE) lobby does not exist!!" << std::endl;
|
std::cerr << " (EE) lobby does not exist!!" << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!it->second.gxs_id.isNull() && it->second.gxs_id != nick)
|
if (!it->second.gxs_id.isNull() && it->second.gxs_id != nick)
|
||||||
{
|
{
|
||||||
changed = true;
|
RsIdentityDetails det1,det2 ;
|
||||||
}
|
|
||||||
}
|
// Only send a nickname change event if the two Identities are not anonymous
|
||||||
|
|
||||||
|
if(rsIdentity->getIdDetails(nick,det1) && rsIdentity->getIdDetails(it->second.gxs_id,det2) && det1.mPgpLinked && det2.mPgpLinked)
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue