mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
isKnownId return true also for own identities
This commit is contained in:
parent
ae0412c087
commit
c9b5b8bbd4
@ -810,9 +810,15 @@ bool p3IdService::getOwnIds(std::list<RsGxsId> &ownIds,bool signed_only)
|
|||||||
return true ;
|
return true ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool p3IdService::isKnownId(const RsGxsId& id)
|
||||||
|
{
|
||||||
|
RS_STACK_MUTEX(mIdMtx);
|
||||||
|
return mKeyCache.is_cached(id) ||
|
||||||
|
std::find(mOwnIds.begin(), mOwnIds.end(),id) != mOwnIds.end();
|
||||||
|
}
|
||||||
|
|
||||||
bool p3IdService::identityToBase64( const RsGxsId& id,
|
bool p3IdService::identityToBase64( const RsGxsId& id,
|
||||||
std::string& base64String )
|
std::string& base64String )
|
||||||
{ return serialiseIdentityToMemory(id, base64String); }
|
{ return serialiseIdentityToMemory(id, base64String); }
|
||||||
|
|
||||||
bool p3IdService::serialiseIdentityToMemory( const RsGxsId& id,
|
bool p3IdService::serialiseIdentityToMemory( const RsGxsId& id,
|
||||||
|
@ -293,12 +293,10 @@ public:
|
|||||||
/// @see RsIdentity
|
/// @see RsIdentity
|
||||||
bool getOwnPseudonimousIds(std::vector<RsGxsId>& ids) override;
|
bool getOwnPseudonimousIds(std::vector<RsGxsId>& ids) override;
|
||||||
|
|
||||||
virtual bool getOwnIds(std::list<RsGxsId> &ownIds, bool signed_only = false);
|
bool getOwnIds(
|
||||||
|
std::list<RsGxsId> &ownIds, bool signed_only = false ) override;
|
||||||
|
|
||||||
//virtual bool getPublicKey(const RsGxsId &id, RsTlvSecurityKey &key) ;
|
bool isKnownId(const RsGxsId& id) override;
|
||||||
//virtual void networkRequestPublicKey(const RsGxsId& key_id,const std::list<RsPeerId>& peer_ids) ;
|
|
||||||
|
|
||||||
inline bool isKnownId(const RsGxsId& id) override { return haveKey(id); }
|
|
||||||
|
|
||||||
bool isOwnId(const RsGxsId& key_id) override;
|
bool isOwnId(const RsGxsId& key_id) override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user