fixed connexion between posted items and async API, and removed dead code and debug info

This commit is contained in:
csoler 2020-02-19 21:52:55 +01:00
parent d3bd237cde
commit 5645d71699
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
13 changed files with 29 additions and 275 deletions

View file

@ -302,17 +302,17 @@ bool p3Posted::createPost(uint32_t &token, RsPostedPost &msg)
bool p3Posted::getBoardsInfo(
const std::list<RsGxsGroupId>& boardsIds,
std::vector<RsPostedGroup>& channelsInfo )
std::vector<RsPostedGroup>& groupsInfo )
{
uint32_t token;
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
if( !requestGroupInfo(token, opts, boardsIds)
|| waitToken(token) != RsTokenService::COMPLETE ) return false;
return getGroupData(token, channelsInfo) && !channelsInfo.empty();
return getGroupData(token, groupsInfo) && !groupsInfo.empty();
}
bool p3Posted::getBoardContent( const RsGxsGroupId& channelId,
bool p3Posted::getBoardContent( const RsGxsGroupId& groupId,
const std::set<RsGxsMessageId>& contentsIds,
std::vector<RsPostedPost>& posts,
std::vector<RsGxsComment>& comments )
@ -322,7 +322,7 @@ bool p3Posted::getBoardContent( const RsGxsGroupId& channelId,
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
GxsMsgReq msgIds;
msgIds[channelId] = contentsIds;
msgIds[groupId] = contentsIds;
if( !requestMsgInfo(token, opts, msgIds) ||
waitToken(token) != RsTokenService::COMPLETE ) return false;

View file

@ -58,12 +58,10 @@ virtual void receiveHelperChanges(std::vector<RsGxsNotify*>& changes)
return RsGxsIfaceHelper::receiveChanges(changes);
}
bool getBoardsInfo(
const std::list<RsGxsGroupId>& boardsIds,
std::vector<RsPostedGroup>& channelsInfo ) override;
bool getBoardsInfo(const std::list<RsGxsGroupId>& boardsIds,
std::vector<RsPostedGroup>& groupsInfo ) override;
bool getBoardContent(
const RsGxsGroupId& boardId,
bool getBoardContent(const RsGxsGroupId& groupId,
const std::set<RsGxsMessageId>& contentsIds,
std::vector<RsPostedPost>& posts,
std::vector<RsGxsComment>& comments ) override;