Add the private chat message to the history after removing the private chat queue (when the user has read the message).

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4628 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-10-01 20:50:39 +00:00
parent af3f9b1dcc
commit 086f33c1a6

View File

@ -435,8 +435,6 @@ void p3ChatService::receiveChatQueue()
if (ci->chatFlags & RS_CHAT_FLAG_PRIVATE) {
privateChanged = true;
privateIncomingList.push_back(ci); // don't delete the item !!
mHistoryMgr->addMessage(true, ci->PeerId(), ci->PeerId(), ci);
} else {
publicChanged = true;
publicList.push_back(ci); // don't delete the item !!
@ -648,6 +646,10 @@ bool p3ChatService::clearPrivateChatQueue(bool incoming, const std::string &id)
RsChatMsgItem *c = *it;
if (c->PeerId() == id) {
if (incoming) {
mHistoryMgr->addMessage(true, c->PeerId(), c->PeerId(), c);
}
delete c;
changed = true;