From 4cb7522feb0ef261d0e053a218cafcccdf2c0bbc Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 7 Jun 2017 21:41:00 +0200 Subject: [PATCH] added deleted gxs messages to the reject list of GxsNetService to avoid re-downloading them right away --- libretroshare/src/gxs/rsgenexchange.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 5845a2887..32ddaa7e6 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -1752,8 +1752,18 @@ void RsGenExchange::deleteGroup(uint32_t& token, const RsGxsGroupId& grpId) } void RsGenExchange::deleteMsgs(uint32_t& token, const GxsMsgReq& msgs) { + RS_STACK_MUTEX(mGenMtx) ; + token = mDataAccess->generatePublicToken(); mMsgDeletePublish.push_back(MsgDeletePublish(msgs, token)); + + // This code below will suspend any requests of the deleted messages for 24 hrs. This of course only works + // if all friend nodes consistently delete the messages in the mean time. + + if(mNetService != NULL) + for(GxsMsgReq::const_iterator it(msgs.begin());it!=msgs.end();++it) + for(uint32_t i=0;isecond.size();++i) + mNetService->rejectMessage(it->second[i]) ; } void RsGenExchange::publishMsg(uint32_t& token, RsGxsMsgItem *msgItem)