mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-05 13:19:32 -04:00
added mOriginator to CircleCache entry and auto-ask for unknown GXS ids to the friend who supplied the circle group
This commit is contained in:
parent
ba1a1b2a61
commit
048192ee9c
4 changed files with 9 additions and 13 deletions
|
@ -2840,8 +2840,8 @@ void RsGenExchange::processRecvdGroups()
|
||||||
// now check if group already existss
|
// now check if group already existss
|
||||||
if(std::find(existingGrpIds.begin(), existingGrpIds.end(), grp->grpId) == existingGrpIds.end())
|
if(std::find(existingGrpIds.begin(), existingGrpIds.end(), grp->grpId) == existingGrpIds.end())
|
||||||
{
|
{
|
||||||
if(meta->mCircleType == GXS_CIRCLE_TYPE_YOUREYESONLY)
|
//if(meta->mCircleType == GXS_CIRCLE_TYPE_YOUREYESONLY)
|
||||||
meta->mOriginator = grp->PeerId();
|
meta->mOriginator = grp->PeerId();
|
||||||
|
|
||||||
meta->mSubscribeFlags = GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED;
|
meta->mSubscribeFlags = GXS_SERV::GROUP_SUBSCRIBE_NOT_SUBSCRIBED;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
/****
|
/****
|
||||||
* #define DEBUG_CIRCLES 1
|
* #define DEBUG_CIRCLES 1
|
||||||
****/
|
****/
|
||||||
#define DEBUG_CIRCLES 1
|
|
||||||
|
|
||||||
RsGxsCircles *rsGxsCircles = NULL;
|
RsGxsCircles *rsGxsCircles = NULL;
|
||||||
|
|
||||||
|
@ -978,6 +977,7 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
|
||||||
|
|
||||||
RsGxsCircleCache &cache = it->second;
|
RsGxsCircleCache &cache = it->second;
|
||||||
cache.loadBaseCircle(group);
|
cache.loadBaseCircle(group);
|
||||||
|
cache.mOriginator = item->meta.mOriginator ;
|
||||||
delete item;
|
delete item;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1043,6 +1043,8 @@ bool p3GxsCircles::cache_load_for_token(uint32_t token)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::list<PeerId> peers;
|
std::list<PeerId> peers;
|
||||||
|
peers.push_back(cache.mOriginator) ;
|
||||||
|
|
||||||
mIdentities->requestKey(*pit, peers);
|
mIdentities->requestKey(*pit, peers);
|
||||||
|
|
||||||
/* store in to_process queue. */
|
/* store in to_process queue. */
|
||||||
|
|
|
@ -156,6 +156,8 @@ class RsGxsCircleCache
|
||||||
|
|
||||||
std::set<RsGxsId> mAllowedAnonPeers;
|
std::set<RsGxsId> mAllowedAnonPeers;
|
||||||
std::map<RsPgpId, std::set<RsGxsId> > mAllowedSignedPeers;
|
std::map<RsPgpId, std::set<RsGxsId> > mAllowedSignedPeers;
|
||||||
|
|
||||||
|
RsPeerId mOriginator ; // peer who sent the data, in case we need to ask for ids
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -882,9 +882,6 @@ bool IdDialog::fillIdListItem(const RsGxsIdGroup& data, QTreeWidgetItem *&item,
|
||||||
item->setToolTip(RSID_COL_IDTYPE, tooltip) ;
|
item->setToolTip(RSID_COL_IDTYPE, tooltip) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ID_DEBUG
|
|
||||||
std::cerr << "Setting item image : " << pixmap.width() << " x " << pixmap.height() << std::endl;
|
|
||||||
#endif
|
|
||||||
QPixmap pixmap ;
|
QPixmap pixmap ;
|
||||||
|
|
||||||
if(data.mImage.mSize == 0 || !pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG"))
|
if(data.mImage.mSize == 0 || !pixmap.loadFromData(data.mImage.mData, data.mImage.mSize, "PNG"))
|
||||||
|
@ -1119,7 +1116,7 @@ void IdDialog::insertIdDetails(uint32_t token)
|
||||||
pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId))) ;
|
pixmap = QPixmap::fromImage(GxsIdDetails::makeDefaultIcon(RsGxsId(data.mMeta.mGroupId))) ;
|
||||||
|
|
||||||
#ifdef ID_DEBUG
|
#ifdef ID_DEBUG
|
||||||
std::cerr << "Setting header frame image : " << pix.width() << " x " << pix.height() << std::endl;
|
std::cerr << "Setting header frame image : " << pixmap.width() << " x " << pixmap.height() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ui->avlabel->setPixmap(pixmap);
|
ui->avlabel->setPixmap(pixmap);
|
||||||
|
@ -1263,7 +1260,7 @@ void IdDialog::modifyReputation()
|
||||||
rsReputations->setOwnOpinion(id,op) ;
|
rsReputations->setOwnOpinion(id,op) ;
|
||||||
|
|
||||||
#ifdef ID_DEBUG
|
#ifdef ID_DEBUG
|
||||||
std::cerr << "IdDialog::modifyReputation() ID: " << id << " Mod: " << mod;
|
std::cerr << "IdDialog::modifyReputation() ID: " << id << " Mod: " << op;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1281,11 +1278,6 @@ void IdDialog::modifyReputation()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ID_DEBUG
|
|
||||||
std::cerr << "IdDialog::modifyReputation() queuingRequest(), token: " << token;
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// trigger refresh when finished.
|
// trigger refresh when finished.
|
||||||
// basic / anstype are not needed.
|
// basic / anstype are not needed.
|
||||||
requestIdDetails();
|
requestIdDetails();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue