mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-27 17:18:11 -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
@ -1631,25 +1631,30 @@ bool DistributedChatService::setIdentityForChatLobby(const ChatLobbyId& lobby_id
|
||||
bool changed = false;
|
||||
std::map<ChatLobbyId,ChatLobbyEntry>::iterator it;
|
||||
|
||||
{
|
||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||
{
|
||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||
|
||||
#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
|
||||
it = _chat_lobbys.find(lobby_id) ;
|
||||
it = _chat_lobbys.find(lobby_id) ;
|
||||
|
||||
if(it == _chat_lobbys.end())
|
||||
{
|
||||
std::cerr << " (EE) lobby does not exist!!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
if(it == _chat_lobbys.end())
|
||||
{
|
||||
std::cerr << " (EE) lobby does not exist!!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user