make identity name size limit in id service consistent with the limit in the GUI (patch from Henry)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8550 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-06-24 09:53:40 +00:00
parent dc4df569bd
commit 0e1b3eac2e

View File

@ -409,7 +409,8 @@ bool p3IdService:: getIdDetails(const RsGxsId &id, RsIdentityDetails &details)
details = data.details;
details.mLastUsageTS = locked_getLastUsageTS(id) ;
if(details.mNickname.length() > 200)
// one utf8 symbol can be at most 4 bytes long - would be better to measure real unicode length !!!
if(details.mNickname.length() > RSID_MAXIMUM_NICKNAME_SIZE*4)
details.mNickname = "[too long a name]" ;
return true;