webui: added chat

This commit is contained in:
electron128 2015-07-29 15:02:10 +02:00 committed by cave beat
parent 1939ea9f54
commit a9ef48d133
14 changed files with 1621 additions and 44 deletions

View file

@ -112,4 +112,17 @@ void GxsResponseTask::streamGxsId(RsGxsId id, StreamBase &stream)
}
}
std::string GxsResponseTask::getName(RsGxsId id)
{
for(std::vector<RsIdentityDetails>::iterator vit = mIdentityDetails.begin();
vit != mIdentityDetails.end(); ++vit)
{
if(vit->mId == id)
return vit->mNickname;
}
std::cerr << "Warning: identity not found in GxsResponseTask::getName(). This is probably a bug. You must call GxsResponseTask::requestGxsId() before you can get the name." << std::endl;
return "";
}
} // namespace resource_api