Added history for chat lobbies and disabled it until the lobbies are saved.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4813 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-01-18 20:47:32 +00:00
parent 51cfb0c5fe
commit 3a271abf11
3 changed files with 20 additions and 5 deletions

View file

@ -65,11 +65,18 @@ void p3HistoryMgr::addMessage(bool incoming, const std::string &chatPeerId, cons
return;
}
const RsChatLobbyMsgItem *cli = dynamic_cast<const RsChatLobbyMsgItem*>(chatItem);
if (cli) {
// disable history for chat lobbies until they are saved
return;
}
RsHistoryMsgItem* item = new RsHistoryMsgItem;
item->chatPeerId = chatPeerId;
item->incoming = incoming;
item->peerId = peerId;
item->peerName = rsPeers->getPeerName(item->peerId);
item->peerName = cli ? cli->nick : rsPeers->getPeerName(item->peerId);
item->sendTime = chatItem->sendTime;
item->recvTime = chatItem->recvTime;