mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 09:34:10 -05:00
added code to reject messages based on existing per-user statistics
This commit is contained in:
parent
09ff94c9ec
commit
26bb865d29
4 changed files with 60 additions and 20 deletions
|
|
@ -2900,7 +2900,7 @@ void RsGenExchange::processRecvdMessages()
|
|||
std::cerr << " deserialised info: grp id=" << meta->mGroupId << ", msg id=" << meta->mMsgId ;
|
||||
#endif
|
||||
uint8_t validateReturn = VALIDATE_FAIL;
|
||||
bool accept_new_msg = acceptNewMessage(meta);
|
||||
bool accept_new_msg = acceptNewMessage(meta,msg->msg.bin_len);
|
||||
|
||||
if(!accept_new_msg && mNetService != NULL)
|
||||
mNetService->rejectMessage(meta->mMsgId) ; // This prevents reloading the message again at next sync.
|
||||
|
|
@ -3047,7 +3047,7 @@ void RsGenExchange::processRecvdMessages()
|
|||
}
|
||||
|
||||
bool RsGenExchange::acceptNewGroup(const RsGxsGrpMetaData* /*grpMeta*/ ) { return true; }
|
||||
bool RsGenExchange::acceptNewMessage(const RsGxsMsgMetaData* /*grpMeta*/ ) { return true; }
|
||||
bool RsGenExchange::acceptNewMessage(const RsGxsMsgMetaData* /*grpMeta*/,uint32_t size ) { return true; }
|
||||
|
||||
void RsGenExchange::processRecvdGroups()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ public:
|
|||
* \param grpMeta Group metadata to check
|
||||
* \return
|
||||
*/
|
||||
virtual bool acceptNewMessage(const RsGxsMsgMetaData *msgMeta) ;
|
||||
virtual bool acceptNewMessage(const RsGxsMsgMetaData *msgMeta, uint32_t size) ;
|
||||
|
||||
bool subscribeToGroup(uint32_t& token, const RsGxsGroupId& grpId, bool subscribe);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue