mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-15 16:49:20 -05:00
fixed auto-DL from trusted identities
This commit is contained in:
parent
6c13d4bf4d
commit
1e53bf3b77
1 changed files with 10 additions and 8 deletions
|
|
@ -196,15 +196,17 @@ void p3MsgService::processIncomingMsg(RsMsgItem *mi)
|
||||||
/**** STACK UNLOCKED ***/
|
/**** STACK UNLOCKED ***/
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the peer is allowed to push files, then auto-download the recommended files.
|
// If the peer is allowed to push files, then auto-download the recommended files.
|
||||||
if(rsPeers->servicePermissionFlags(mi->PeerId()) & RS_NODE_PERM_ALLOW_PUSH)
|
|
||||||
{
|
|
||||||
std::list<RsPeerId> srcIds;
|
|
||||||
srcIds.push_back(mi->PeerId());
|
|
||||||
|
|
||||||
for(std::list<RsTlvFileItem>::const_iterator it(mi->attachment.items.begin());it!=mi->attachment.items.end();++it)
|
RsIdentityDetails id_details;
|
||||||
rsFiles->FileRequest((*it).name,(*it).hash,(*it).filesize,std::string(),RS_FILE_REQ_ANONYMOUS_ROUTING,srcIds) ;
|
if(rsIdentity->getIdDetails(RsGxsId(mi->PeerId()),id_details) && !id_details.mPgpId.isNull() && (rsPeers->servicePermissionFlags(id_details.mPgpId) & RS_NODE_PERM_ALLOW_PUSH))
|
||||||
}
|
{
|
||||||
|
std::list<RsPeerId> srcIds;
|
||||||
|
srcIds.push_back(mi->PeerId());
|
||||||
|
|
||||||
|
for(std::list<RsTlvFileItem>::const_iterator it(mi->attachment.items.begin());it!=mi->attachment.items.end();++it)
|
||||||
|
rsFiles->FileRequest((*it).name,(*it).hash,(*it).filesize,std::string(),RS_FILE_REQ_ANONYMOUS_ROUTING,srcIds) ;
|
||||||
|
}
|
||||||
|
|
||||||
RsServer::notify()->notifyListChange(NOTIFY_LIST_MESSAGELIST,NOTIFY_TYPE_ADD);
|
RsServer::notify()->notifyListChange(NOTIFY_LIST_MESSAGELIST,NOTIFY_TYPE_ADD);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue