mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-04 17:15:31 -05:00
Index only public channels
This commit is contained in:
parent
0f63283f96
commit
5a41b3cb37
@ -201,40 +201,6 @@ bool RsGxsIntegrityCheck::check()
|
|||||||
{
|
{
|
||||||
subscribed_groups.insert(git->first);
|
subscribed_groups.insert(git->first);
|
||||||
|
|
||||||
#ifdef RS_DEEP_SEARCH
|
|
||||||
if(isGxsChannels)
|
|
||||||
{
|
|
||||||
RsGxsGrpMetaData meta;
|
|
||||||
meta.deserialise(grp->meta.bin_data, grp->meta.bin_len);
|
|
||||||
|
|
||||||
uint32_t blz = grp->grp.bin_len;
|
|
||||||
RsItem* rIt = mSerializer.deserialise(grp->grp.bin_data,
|
|
||||||
&blz);
|
|
||||||
|
|
||||||
if( RsGxsChannelGroupItem* cgIt =
|
|
||||||
dynamic_cast<RsGxsChannelGroupItem*>(rIt) )
|
|
||||||
{
|
|
||||||
RsGxsChannelGroup cg;
|
|
||||||
cgIt->toChannelGroup(cg, false);
|
|
||||||
cg.mMeta = meta;
|
|
||||||
|
|
||||||
DeepSearch::indexChannelGroup(cg);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << __PRETTY_FUNCTION__ << " Group: "
|
|
||||||
<< meta.mGroupId.toStdString() << " "
|
|
||||||
<< meta.mGroupName
|
|
||||||
<< " doesn't seems a channel, please "
|
|
||||||
<< "report to developers"
|
|
||||||
<< std::endl;
|
|
||||||
print_stacktrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
delete rIt;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(!grp->metaData->mAuthorId.isNull())
|
if(!grp->metaData->mAuthorId.isNull())
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_GXSUTIL
|
#ifdef DEBUG_GXSUTIL
|
||||||
@ -246,6 +212,42 @@ bool RsGxsIntegrityCheck::check()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else msgIds.erase(msgIds.find(grp->grpId));
|
else msgIds.erase(msgIds.find(grp->grpId));
|
||||||
|
|
||||||
|
#ifdef RS_DEEP_SEARCH
|
||||||
|
if( isGxsChannels
|
||||||
|
&& grp->metaData->mCircleType == GXS_CIRCLE_TYPE_PUBLIC
|
||||||
|
&& grp->metaData->mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_SUBSCRIBED )
|
||||||
|
{
|
||||||
|
RsGxsGrpMetaData meta;
|
||||||
|
meta.deserialise(grp->meta.bin_data, grp->meta.bin_len);
|
||||||
|
|
||||||
|
uint32_t blz = grp->grp.bin_len;
|
||||||
|
RsItem* rIt = mSerializer.deserialise(grp->grp.bin_data,
|
||||||
|
&blz);
|
||||||
|
|
||||||
|
if( RsGxsChannelGroupItem* cgIt =
|
||||||
|
dynamic_cast<RsGxsChannelGroupItem*>(rIt) )
|
||||||
|
{
|
||||||
|
RsGxsChannelGroup cg;
|
||||||
|
cgIt->toChannelGroup(cg, false);
|
||||||
|
cg.mMeta = meta;
|
||||||
|
|
||||||
|
DeepSearch::indexChannelGroup(cg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << " Group: "
|
||||||
|
<< meta.mGroupId.toStdString() << " "
|
||||||
|
<< meta.mGroupName
|
||||||
|
<< " doesn't seems a channel, please "
|
||||||
|
<< "report to developers"
|
||||||
|
<< std::endl;
|
||||||
|
print_stacktrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
delete rIt;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -49,10 +49,9 @@ extern RsGxsCircles *rsGxsCircles;
|
|||||||
|
|
||||||
typedef RsPgpId RsPgpId;
|
typedef RsPgpId RsPgpId;
|
||||||
|
|
||||||
// The meaning of the different circle types is:
|
/// The meaning of the different circle types is:
|
||||||
//
|
/// TODO: convert to enum
|
||||||
//
|
static const uint32_t GXS_CIRCLE_TYPE_UNKNOWN = 0x0000 ; /// Used to detect uninizialized values.
|
||||||
static const uint32_t GXS_CIRCLE_TYPE_UNKNOWN = 0x0000 ; // not known. Is treated as public.
|
|
||||||
static const uint32_t GXS_CIRCLE_TYPE_PUBLIC = 0x0001 ; // not restricted to a circle
|
static const uint32_t GXS_CIRCLE_TYPE_PUBLIC = 0x0001 ; // not restricted to a circle
|
||||||
static const uint32_t GXS_CIRCLE_TYPE_EXTERNAL = 0x0002 ; // restricted to an external circle, made of RsGxsId
|
static const uint32_t GXS_CIRCLE_TYPE_EXTERNAL = 0x0002 ; // restricted to an external circle, made of RsGxsId
|
||||||
static const uint32_t GXS_CIRCLE_TYPE_YOUR_FRIENDS_ONLY = 0x0003 ; // restricted to a subset of friend nodes of a given RS node given by a RsPgpId list
|
static const uint32_t GXS_CIRCLE_TYPE_YOUR_FRIENDS_ONLY = 0x0003 ; // restricted to a subset of friend nodes of a given RS node given by a RsPgpId list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user