mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
fixed GUI tooltips over banned items. Added dropping of messages from banned identities in chat lobbies
This commit is contained in:
parent
1a76bea6ff
commit
82c16c6a27
3 changed files with 23 additions and 4 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "pqi/p3historymgr.h"
|
||||
#include "retroshare/rspeers.h"
|
||||
#include "retroshare/rsiface.h"
|
||||
#include "retroshare/rsreputations.h"
|
||||
#include "retroshare/rsidentity.h"
|
||||
#include "rsserver/p3face.h"
|
||||
#include "gxs/rsgixs.h"
|
||||
|
@ -175,6 +176,12 @@ bool DistributedChatService::handleRecvChatLobbyMsgItem(RsChatMsgItem *ci)
|
|||
return false ;
|
||||
}
|
||||
}
|
||||
if(rsReputations->isIdentityBanned(cli->signature.keyId))
|
||||
{
|
||||
std::cerr << "(WW) Received lobby msg/item from banned identity " << cli->signature.keyId << ". Dropping it." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
if(!bounceLobbyObject(cli,cli->PeerId())) // forwards the message to friends, keeps track of subscribers, etc.
|
||||
return false;
|
||||
|
||||
|
@ -672,6 +679,11 @@ void DistributedChatService::handleRecvChatLobbyEventItem(RsChatLobbyEventItem *
|
|||
return ;
|
||||
}
|
||||
}
|
||||
if(rsReputations->isIdentityBanned(item->signature.keyId))
|
||||
{
|
||||
std::cerr << "(WW) Received lobby msg/item from banned identity " << item->signature.keyId << ". Dropping it." << std::endl;
|
||||
return ;
|
||||
}
|
||||
addTimeShiftStatistics((int)now - (int)item->sendTime) ;
|
||||
|
||||
if(now+100 > (time_t) item->sendTime + MAX_KEEP_MSG_RECORD) // the message is older than the max cache keep minus 100 seconds ! It's too old, and is going to make an echo!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue