mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 15:30:31 -04:00
Added getMsgRelatedData test
Fixed bug with getmsgRelatedFucntion for msgs with no relatives (message with no relatives would end of pulling itself, i.e. the id/data/meta of message whose relative are being searched for) git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5827 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b5910e0314
commit
2230bd1a96
6 changed files with 154 additions and 22 deletions
|
@ -1275,21 +1275,24 @@ bool RsGxsDataAccess::getMsgRelatedInfo(MsgRelatedInfoReq *req)
|
|||
filteredOutMsgIds[grpId] = outMsgIds;
|
||||
filterMsgList(filteredOutMsgIds, opts, filterMap);
|
||||
|
||||
if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_IDS)
|
||||
if(!outMsgIds.empty())
|
||||
{
|
||||
req->mMsgIdResult[grpMsgIdPair] = filteredOutMsgIds[grpId];
|
||||
}
|
||||
else if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_META)
|
||||
{
|
||||
GxsMsgMetaResult metaResult;
|
||||
mDataStore->retrieveGxsMsgMetaData(filteredOutMsgIds, metaResult);
|
||||
req->mMsgMetaResult[grpMsgIdPair] = metaResult[grpId];
|
||||
}
|
||||
else if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_DATA)
|
||||
{
|
||||
GxsMsgResult msgResult;
|
||||
mDataStore->retrieveNxsMsgs(filteredOutMsgIds, msgResult, false, true);
|
||||
req->mMsgDataResult[grpMsgIdPair] = msgResult[grpId];
|
||||
if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_IDS)
|
||||
{
|
||||
req->mMsgIdResult[grpMsgIdPair] = filteredOutMsgIds[grpId];
|
||||
}
|
||||
else if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_META)
|
||||
{
|
||||
GxsMsgMetaResult metaResult;
|
||||
mDataStore->retrieveGxsMsgMetaData(filteredOutMsgIds, metaResult);
|
||||
req->mMsgMetaResult[grpMsgIdPair] = metaResult[grpId];
|
||||
}
|
||||
else if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_DATA)
|
||||
{
|
||||
GxsMsgResult msgResult;
|
||||
mDataStore->retrieveNxsMsgs(filteredOutMsgIds, msgResult, false, true);
|
||||
req->mMsgDataResult[grpMsgIdPair] = msgResult[grpId];
|
||||
}
|
||||
}
|
||||
|
||||
outMsgIds.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue