diff --git a/retroshare-gui/src/gui/MessagesDialog.cpp b/retroshare-gui/src/gui/MessagesDialog.cpp
index 5a462769f..ac46c6f37 100644
--- a/retroshare-gui/src/gui/MessagesDialog.cpp
+++ b/retroshare-gui/src/gui/MessagesDialog.cpp
@@ -887,13 +887,24 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
QString msgTxt;
for(pit = msgInfo.msgto.begin(); pit != msgInfo.msgto.end(); pit++)
{
- msgTxt += " " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "" + " ";
+ if (QString::fromStdString(rsPeers->getPeerName(*pit)) == "")
+ {
+ msgTxt += " " + tr("Anonymous") + "" + " ";
+ }
+ else
+ msgTxt += " " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "" + " ";
+
}
if (msgInfo.msgcc.size() > 0)
msgTxt += "\nCc: ";
for(pit = msgInfo.msgcc.begin(); pit != msgInfo.msgcc.end(); pit++)
{
+ if (QString::fromStdString(rsPeers->getPeerName(*pit)) == "")
+ {
+ msgTxt += " " + tr("Anonymous") + "" + " ";
+ }
+ else
msgTxt += " " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "" + " ";
}
@@ -901,6 +912,11 @@ void MessagesDialog::insertMsgTxtAndFiles(QModelIndex Index)
msgTxt += "\nBcc: ";
for(pit = msgInfo.msgbcc.begin(); pit != msgInfo.msgbcc.end(); pit++)
{
+ if (QString::fromStdString(rsPeers->getPeerName(*pit)) == "")
+ {
+ msgTxt += " " + tr("Anonymous") + "" + " ";
+ }
+ else
msgTxt += " " + QString::fromStdString(rsPeers->getPeerName(*pit)) + "" + " ";
}