mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-08 22:32:34 -04:00
fixed auto-subscribe of circles when unsigned identities are locally owned
This commit is contained in:
parent
4136d09156
commit
9e8a4cdac4
1 changed files with 19 additions and 1 deletions
|
@ -1235,9 +1235,27 @@ bool p3GxsCircles::checkCircleCacheForAutoSubscribe(RsGxsCircleCache &cache)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if we appear in the group - then autosubscribe, and mark as processed */
|
/* if we appear in the group - then autosubscribe, and mark as processed */
|
||||||
|
|
||||||
const RsPgpId& ownId = mPgpUtils->getPGPOwnId();
|
const RsPgpId& ownId = mPgpUtils->getPGPOwnId();
|
||||||
std::map<RsPgpId, std::list<RsGxsId> >::iterator it = cache.mAllowedPeers.find(ownId);
|
std::map<RsPgpId, std::list<RsGxsId> >::iterator it = cache.mAllowedPeers.find(ownId);
|
||||||
if (it != cache.mAllowedPeers.end())
|
|
||||||
|
bool am_I_allowed = it != cache.mAllowedPeers.end() ;
|
||||||
|
|
||||||
|
if(!am_I_allowed)
|
||||||
|
{
|
||||||
|
// also check if there's an unknown anonymous identity in the list that would belong to us
|
||||||
|
std::list<RsGxsId> own_gxs_ids ;
|
||||||
|
rsIdentity->getOwnIds(own_gxs_ids) ;
|
||||||
|
|
||||||
|
for(std::list<RsGxsId>::const_iterator it(own_gxs_ids.begin());it!=own_gxs_ids.end();++it)
|
||||||
|
if(cache.mUnknownPeers.end() != cache.mUnknownPeers.find(*it))
|
||||||
|
{
|
||||||
|
am_I_allowed = true ;
|
||||||
|
break ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(am_I_allowed)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_CIRCLES
|
#ifdef DEBUG_CIRCLES
|
||||||
/* we are part of this group - subscribe, clear unprocessed flag */
|
/* we are part of this group - subscribe, clear unprocessed flag */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue