mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 23:49:35 -05:00
Merge pull request #912 from Emotyco/libresapi_avatar_handlers
Changed: Request handler for avatar return failure if an error occurred while obtaining data
This commit is contained in:
commit
5b1def1405
@ -600,13 +600,16 @@ void IdentityHandler::handleGetAvatar(Request& req, Response& resp)
|
||||
req.mStream << makeKeyValueReference("gxs_id", gxs_id);
|
||||
|
||||
RsIdentityDetails details;
|
||||
mRsIdentity->getIdDetails(RsGxsId(gxs_id), details);
|
||||
bool got = mRsIdentity->getIdDetails(RsGxsId(gxs_id), details);
|
||||
|
||||
std::string base64Avatar;
|
||||
Radix64::encode(details.mAvatar.mData, details.mAvatar.mSize, base64Avatar);
|
||||
resp.mDataStream << makeKeyValue("avatar", base64Avatar);
|
||||
|
||||
resp.setOk();
|
||||
if(got)
|
||||
resp.setOk();
|
||||
else
|
||||
resp.setFail();
|
||||
}
|
||||
|
||||
void IdentityHandler::handleSetBanNode(Request& req, Response& resp)
|
||||
|
Loading…
Reference in New Issue
Block a user