Merge pull request #2034 from drbob/fix_retrieve_latest_msgs

Fix Gxs data requests with LATEST flag.
This commit is contained in:
csoler 2020-07-30 23:12:35 +02:00 committed by GitHub
commit da60b565ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;i<metaV.size();++i)
if(!metaV[i]->mParentId.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;