From 086f33c1a6689be697cc93a2161ef981180b28ec Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sat, 1 Oct 2011 20:50:39 +0000 Subject: [PATCH] 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 --- libretroshare/src/services/p3chatservice.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/services/p3chatservice.cc b/libretroshare/src/services/p3chatservice.cc index 3b1e441f2..8c7e02040 100644 --- a/libretroshare/src/services/p3chatservice.cc +++ b/libretroshare/src/services/p3chatservice.cc @@ -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;