mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-21 12:54:26 -04:00
added copy of previous subscription flags when group update is received. Avoids unsubscribing friends when publishing an update to grp metadata
This commit is contained in:
parent
fafe75dca6
commit
b8c42a9eb7
1 changed files with 5 additions and 1 deletions
|
@ -2331,7 +2331,6 @@ void RsGenExchange::publishGrps()
|
||||||
{
|
{
|
||||||
grp->metaData = new RsGxsGrpMetaData();
|
grp->metaData = new RsGxsGrpMetaData();
|
||||||
grpItem->meta.mPublishTs = time(NULL);
|
grpItem->meta.mPublishTs = time(NULL);
|
||||||
//grpItem->meta.mParentGrpId = std::string("empty");
|
|
||||||
*(grp->metaData) = grpItem->meta;
|
*(grp->metaData) = grpItem->meta;
|
||||||
|
|
||||||
// TODO: change when publish key optimisation added (public groups don't have publish key
|
// TODO: change when publish key optimisation added (public groups don't have publish key
|
||||||
|
@ -2927,6 +2926,11 @@ void RsGenExchange::performUpdateValidation()
|
||||||
if(gu.newGrp->metaData->mCircleType == GXS_CIRCLE_TYPE_YOUREYESONLY)
|
if(gu.newGrp->metaData->mCircleType == GXS_CIRCLE_TYPE_YOUREYESONLY)
|
||||||
gu.newGrp->metaData->mOriginator = gu.newGrp->PeerId();
|
gu.newGrp->metaData->mOriginator = gu.newGrp->PeerId();
|
||||||
|
|
||||||
|
// Keep subscriptionflag to what it was. This avoids clearing off the flag when updates to group meta information
|
||||||
|
// is received.
|
||||||
|
|
||||||
|
gu.newGrp->metaData->mSubscribeFlags = gu.oldGrpMeta->mSubscribeFlags ;
|
||||||
|
|
||||||
grps.insert(std::make_pair(gu.newGrp, gu.newGrp->metaData));
|
grps.insert(std::make_pair(gu.newGrp, gu.newGrp->metaData));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue