Merge pull request #941 from PhenomRetroShare/Add_UnsignedInChatName

Add [Unsigned] before name in chat for unsigned (anonymous) GxsID.
This commit is contained in:
csoler 2017-07-17 22:18:53 +02:00 committed by GitHub
commit 7d8b3796d1

View File

@ -1006,8 +1006,12 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const RsGxsId gx
QString strGxsId = "";
if (!gxsId.isNull()) {
strGxsId = QString::fromStdString(gxsId.toStdString());
RsIdentityDetails details;
rsIdentity->getIdDetails(gxsId, details);
formatMsg.replace(QString("<a name=\"name\">")
,QString("<a name=\"").append(PERSONID).append("%1\">").arg(strGxsId) );
,QString("<a name=\"").append(PERSONID).append("%1\">").arg(strGxsId)
.append(details.mFlags & RS_IDENTITY_FLAGS_PGP_LINKED ? "" : tr("[Unsigned]") ) );
} else {
formatMsg.replace(QString("<a name=\"name\">"),"");
}