mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-05 23:55:35 -04:00
finished removing token queue from IdDialog.cpp
This commit is contained in:
parent
1a250f5138
commit
e4f243694b
5 changed files with 132 additions and 113 deletions
|
@ -312,7 +312,7 @@ public:
|
|||
RsGxsCircleMsg& msg) =0;
|
||||
|
||||
/**
|
||||
* @brief Invite identities to circle
|
||||
* @brief Invite identities to circle (admin key is required)
|
||||
* @jsonapi{development}
|
||||
* @param[in] identities ids of the identities to invite
|
||||
* @param[in] circleId Id of the circle you own and want to invite ids in
|
||||
|
@ -321,6 +321,16 @@ public:
|
|||
virtual bool inviteIdsToCircle( const std::set<RsGxsId>& identities,
|
||||
const RsGxsCircleId& circleId ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Remove identities from circle (admin key is required)
|
||||
* @jsonapi{development}
|
||||
* @param[in] identities ids of the identities to remove from the invite list
|
||||
* @param[in] circleId Id of the circle you own and want to invite ids in
|
||||
* @return false if something failed, true otherwhise
|
||||
*/
|
||||
virtual bool revokeIdsFromCircle( const std::set<RsGxsId>& identities,
|
||||
const RsGxsCircleId& circleId ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Request circle membership, or accept circle invitation
|
||||
* @jsonapi{development}
|
||||
|
|
|
@ -365,6 +365,36 @@ bool p3GxsCircles::inviteIdsToCircle( const std::set<RsGxsId>& identities,
|
|||
return editCircle(circleGrp);
|
||||
}
|
||||
|
||||
bool p3GxsCircles::revokeIdsFromCircle( const std::set<RsGxsId>& identities, const RsGxsCircleId& circleId )
|
||||
{
|
||||
const std::list<RsGxsGroupId> circlesIds{ RsGxsGroupId(circleId) };
|
||||
std::vector<RsGxsCircleGroup> circlesInfo;
|
||||
|
||||
if(!getCirclesInfo(circlesIds, circlesInfo))
|
||||
{
|
||||
std::cerr << __PRETTY_FUNCTION__ << "Error! Failure getting group data." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(circlesInfo.empty())
|
||||
{
|
||||
std::cerr << __PRETTY_FUNCTION__ << "Error! Circle: " << circleId.toStdString() << " not found!" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
RsGxsCircleGroup& circleGrp = circlesInfo[0];
|
||||
|
||||
if(!(circleGrp.mMeta.mSubscribeFlags & GXS_SERV::GROUP_SUBSCRIBE_ADMIN))
|
||||
{
|
||||
std::cerr << __PRETTY_FUNCTION__ << "Error! Attempt to edit non-own " << "circle: " << circleId.toStdString() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
circleGrp.mInvitedMembers.erase(identities.begin(), identities.end());
|
||||
|
||||
return editCircle(circleGrp);
|
||||
}
|
||||
|
||||
bool p3GxsCircles::exportCircleLink(
|
||||
std::string& link, const RsGxsCircleId& circleId,
|
||||
bool includeGxsData, const std::string& baseUrl, std::string& errMsg )
|
||||
|
|
|
@ -208,6 +208,10 @@ public:
|
|||
bool inviteIdsToCircle( const std::set<RsGxsId>& identities,
|
||||
const RsGxsCircleId& circleId ) override;
|
||||
|
||||
/// @see RsGxsCircles
|
||||
bool revokeIdsFromCircle( const std::set<RsGxsId>& identities,
|
||||
const RsGxsCircleId& circleId ) override;
|
||||
|
||||
/// @see RsGxsCircles
|
||||
bool getCircleRequest(const RsGxsGroupId& circleId,
|
||||
const RsGxsMessageId& msgId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue