fixed supid bug causing msgs to not be correctly retrieved

This commit is contained in:
csoler 2020-04-10 22:23:49 +02:00
parent e433a64bb2
commit b7363b4d4e
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -1038,7 +1038,6 @@ bool RsGxsDataAccess::getMsgMetaDataList( const GxsMsgReq& msgIds, const RsTokRe
}
GxsMsgMetaResult::iterator meta_it;
//MsgMetaFilter metaFilter;
for(meta_it = result.begin(); meta_it != result.end(); ++meta_it)
{
@ -1048,7 +1047,7 @@ bool RsGxsDataAccess::getMsgMetaDataList( const GxsMsgReq& msgIds, const RsTokRe
std::vector<RsGxsMsgMetaData*>& metaV = meta_it->second;
if (onlyLatestMsgs)
if (onlyLatestMsgs) // if we only consider latest messages, we need to first filter out messages with "children"
{
// The strategy is the following: for each msg we only know its direct ancestor. So we build a map to be able to find for a given message
// which messages derive from it.
@ -1190,7 +1189,7 @@ bool RsGxsDataAccess::getMsgIdList( const GxsMsgReq& msgIds, const RsTokReqOptio
{
GxsMsgMetaResult result;
getMsgMetaDataList( msgIdsOut, opts, result );
getMsgMetaDataList( msgIds, opts, result );
// extract MessageIds