diff --git a/libretroshare/src/services/p3forums.cc b/libretroshare/src/services/p3forums.cc index b60b5de93..9c09c9e83 100644 --- a/libretroshare/src/services/p3forums.cc +++ b/libretroshare/src/services/p3forums.cc @@ -23,6 +23,7 @@ * */ +#include "rsiface/rspeers.h" #include "services/p3forums.h" uint32_t convertToInternalFlags(uint32_t extFlags); @@ -232,7 +233,7 @@ bool p3Forums::getForumMessage(std::string fId, std::string mId, ForumMsgInfo &i info.title = fmsg->title; info.msg = fmsg->msg; - info.srcId = "SRC"; + info.srcId = rsPeers->getPeerName(fmsg->srcId); return true; } @@ -285,6 +286,7 @@ std::string p3Forums::createForumMsg(std::string fId, std::string pId, fmsg->title = title; fmsg->msg = msg; + fmsg->srcId = rsPeers->getOwnId(); fmsg->timestamp = time(NULL); std::string msgId = publishMsg(fmsg, true); diff --git a/retroshare-gui/src/gui/ForumsDialog.cpp b/retroshare-gui/src/gui/ForumsDialog.cpp index 7f02a4caf..e7fc9c15d 100644 --- a/retroshare-gui/src/gui/ForumsDialog.cpp +++ b/retroshare-gui/src/gui/ForumsDialog.cpp @@ -573,8 +573,11 @@ void ForumsDialog::insertThreads() QString timestamp = qtime.toString("yyyy-MM-dd hh:mm:ss"); item -> setText(0, timestamp); } + ForumMsgInfo msginfo ; + rsForums->getForumMessage(fId,tit->msgId,msginfo) ; + item->setText(1, QString::fromStdWString(tit->title)); - item->setText(2, "author"); + item->setText(2, QString::fromStdString(msginfo.srcId)); item->setText(3, "signed"); item->setText(4, QString::fromStdString(tit->parentId)); item->setText(5, QString::fromStdString(tit->msgId)); @@ -622,8 +625,11 @@ void ForumsDialog::insertThreads() QString timestamp = qtime.toString("yyyy-MM-dd hh:mm:ss"); child -> setText(0, timestamp); } + ForumMsgInfo msginfo ; + rsForums->getForumMessage(fId,mit->msgId,msginfo) ; + child->setText(1, QString::fromStdWString(mit->title)); - child->setText(2, "author"); + child->setText(2, QString::fromStdString(msginfo.srcId)); child->setText(3, "signed"); child->setText(4, QString::fromStdString(mit->parentId)); child->setText(5, QString::fromStdString(mit->msgId));