mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-24 23:19:29 -05:00
Added: Creating identity with avatar in libresapi
This commit is contained in:
parent
54166cec86
commit
e128fcbd87
@ -87,6 +87,15 @@ protected:
|
||||
<< makeKeyValueReference("name", params.nickname)
|
||||
<< makeKeyValueReference("pgp_linked", params.isPgpLinked);
|
||||
|
||||
std::string avatar;
|
||||
req.mStream << makeKeyValueReference("avatar", avatar);
|
||||
|
||||
std::vector<uint8_t> avatar_data = Radix64::decode(avatar);
|
||||
uint8_t *p_avatar_data = &avatar_data[0];
|
||||
uint32_t size = avatar_data.size();
|
||||
params.mImage.clear();
|
||||
params.mImage.copy(p_avatar_data, size);
|
||||
|
||||
if(params.nickname == "")
|
||||
{
|
||||
resp.setFail("name can't be empty");
|
||||
|
Loading…
Reference in New Issue
Block a user