mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added removal of messages frm banned users
This commit is contained in:
parent
59d2ca9c3d
commit
68ca57ce75
5 changed files with 55 additions and 20 deletions
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "rsgxsnetservice.h"
|
||||
#include "retroshare/rsconfig.h"
|
||||
#include "retroshare/rsreputations.h"
|
||||
#include "retroshare/rsgxsflags.h"
|
||||
#include "retroshare/rsgxscircles.h"
|
||||
#include "pgp/pgpauxutils.h"
|
||||
|
@ -2009,7 +2010,7 @@ void RsGxsNetService::locked_genReqMsgTransaction(NxsTransaction* tr)
|
|||
|
||||
// if author is required for this message, it will simply get dropped
|
||||
// at genexchange side of things
|
||||
if(rep.score > (int)grpMeta->mReputationCutOff || noAuthor)
|
||||
if(rsReputations->isIdentityOk(syncItem->authorId) && rep.score > (int)grpMeta->mReputationCutOff || noAuthor)
|
||||
{
|
||||
#ifdef NXS_NET_DEBUG
|
||||
std::cerr << ", passed! Adding message to req list." << std::endl;
|
||||
|
@ -2225,7 +2226,7 @@ void RsGxsNetService::locked_genReqGrpTransaction(NxsTransaction* tr)
|
|||
GixsReputation rep;
|
||||
mReputations->getReputation(grpSyncItem->authorId, rep);
|
||||
|
||||
if(rep.score >= GIXS_CUT_OFF)
|
||||
if(rep.score >= GIXS_CUT_OFF && rsReputations->isIdentityOk(grpSyncItem->authorId))
|
||||
{
|
||||
addGroupItemToList(tr, grpId, transN, reqList);
|
||||
std::cerr << " reputation cut off: limit=" << GIXS_CUT_OFF << " value=" << rep.score << ": allowed." << std::endl;
|
||||
|
|
|
@ -567,6 +567,12 @@ bool p3GxsReputation::setOwnOpinion(const RsGxsId& gxsid, const RsReputations::O
|
|||
#ifdef DEBUG_REPUTATION
|
||||
std::cerr << "setOwnOpinion(): for GXS id " << gxsid << " to " << opinion << std::endl;
|
||||
#endif
|
||||
if(gxsid.isNull())
|
||||
{
|
||||
std::cerr << " ID " << gxsid << " is rejected. Look for a bug in calling method." << std::endl;
|
||||
return false ;
|
||||
}
|
||||
|
||||
RsStackMutex stack(mReputationMtx); /****** LOCKED MUTEX *******/
|
||||
|
||||
std::map<RsGxsId, Reputation>::iterator rit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue