mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 14:12:43 -04:00
extended auto-subscribe to circles with requested membership
This commit is contained in:
parent
8b5e43f2b0
commit
d114b830a7
1 changed files with 8 additions and 4 deletions
|
@ -1262,20 +1262,24 @@ bool p3GxsCircles::locked_checkCircleCacheForAutoSubscribe(RsGxsCircleCache &cac
|
||||||
}
|
}
|
||||||
|
|
||||||
bool in_admin_list = false ;
|
bool in_admin_list = false ;
|
||||||
|
bool member_request = false ;
|
||||||
|
|
||||||
for(std::list<RsGxsId>::const_iterator it(myOwnIds.begin());it!=myOwnIds.end() && !in_admin_list;++it)
|
for(std::list<RsGxsId>::const_iterator it(myOwnIds.begin());it!=myOwnIds.end() && (!in_admin_list) && (!member_request);++it)
|
||||||
{
|
{
|
||||||
std::map<RsGxsId,RsGxsCircleMembershipStatus>::const_iterator it2 = cache.mMembershipStatus.find(*it) ;
|
std::map<RsGxsId,RsGxsCircleMembershipStatus>::const_iterator it2 = cache.mMembershipStatus.find(*it) ;
|
||||||
|
|
||||||
if(it2 != cache.mMembershipStatus.end())
|
if(it2 != cache.mMembershipStatus.end())
|
||||||
in_admin_list = in_admin_list || (it2->second.subscription_flags & GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST) ;
|
{
|
||||||
|
in_admin_list = in_admin_list || bool(it2->second.subscription_flags & GXS_EXTERNAL_CIRCLE_FLAGS_IN_ADMIN_LIST) ;
|
||||||
|
member_request= member_request|| bool(it2->second.subscription_flags & GXS_EXTERNAL_CIRCLE_FLAGS_SUBSCRIBED) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_CIRCLES
|
#ifdef DEBUG_CIRCLES
|
||||||
std::cerr << " own ID in circle: " << in_admin_list << std::endl;
|
std::cerr << " own ID in circle: " << in_admin_list << ", own subscribe request: " << member_request << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(in_admin_list)
|
if(in_admin_list || member_request)
|
||||||
{
|
{
|
||||||
uint32_t token, token2;
|
uint32_t token, token2;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue