From b0245920aa5f4511099be61b5aea3b37e0a86b53 Mon Sep 17 00:00:00 2001 From: drbob Date: Thu, 30 Jul 2020 23:02:17 +1000 Subject: [PATCH] Fix Gxs data requests with LATEST flag. This was broken during a re-write earlier this year. Currently the code incorrectly checks mParentId, this has been fixed to check mOrigMsgId. --- libretroshare/src/gxs/rsgxsdataaccess.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/gxs/rsgxsdataaccess.cc b/libretroshare/src/gxs/rsgxsdataaccess.cc index a695672f9..c2d458cb3 100644 --- a/libretroshare/src/gxs/rsgxsdataaccess.cc +++ b/libretroshare/src/gxs/rsgxsdataaccess.cc @@ -1046,9 +1046,9 @@ bool RsGxsDataAccess::getMsgMetaDataList( const GxsMsgReq& msgIds, const RsTokRe // Now loop once over message Metas and see if they have a parent. If yes, then mark the parent to be discarded. for(uint32_t i=0;imParentId.isNull() && metaV[i]->mParentId != metaV[i]->mMsgId) // this one is a follow up + if(!metaV[i]->mOrigMsgId.isNull() && metaV[i]->mOrigMsgId != metaV[i]->mMsgId) // this one is a follow up { - auto it = index_in_metaV.find(metaV[i]->mParentId); + auto it = index_in_metaV.find(metaV[i]->mOrigMsgId); if(it != index_in_metaV.end()) keep[it->second] = false;