summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-07-01 08:50:37 (GMT)
committerCatalin Badea <catalin.badea392@gmail.com>2012-07-01 08:50:37 (GMT)
commit5a5e0e8328d0c2ec59478ce8a35152cc4f6b05b3 (patch)
treec6743f4d550c9820bd5ab6e90f79216668dd0e53 /Swift/Controllers/Chat/ChatControllerBase.cpp
parent497c5dced0df19fc8953b55aa36b4d1e7101620a (diff)
downloadswift-contrib-5a5e0e8328d0c2ec59478ce8a35152cc4f6b05b3.zip
swift-contrib-5a5e0e8328d0c2ec59478ce8a35152cc4f6b05b3.tar.bz2
Don't log outgoing MUC messages
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index 4fc378a..115c258 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -30,7 +30,6 @@
#include <Swiften/Queries/Requests/GetSecurityLabelsCatalogRequest.h>
#include <Swiften/Avatars/AvatarManager.h>
#include <Swift/Controllers/XMPPEvents/MUCInviteEvent.h>
-#include <Swift/Controllers/HistoryController.h>
namespace Swift {
@@ -144,10 +143,7 @@ void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool
postSendMessage(message->getBody(), boost::dynamic_pointer_cast<Stanza>(message));
onActivity(message->getBody());
- // log message
- if (historyController_) {
- historyController_->addMessage(body, selfJID_, toJID_, now);
- }
+ logMessage(body, selfJID_, toJID_, now, false);
}
void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog> catalog, ErrorPayload::ref error) {
@@ -254,10 +250,9 @@ void ChatControllerBase::handleIncomingMessage(boost::shared_ptr<MessageEvent> m
}
else {
lastMessagesUIID_[from] = addMessage(body, senderDisplayNameFromMessage(from), isIncomingMessageFromMe(message), label, std::string(avatarManager_->getAvatarPath(from).string()), timeStamp);
- if (historyController_) {
- historyController_->addMessage(body, from, selfJID_, timeStamp);
- }
}
+
+ logMessage(body, from, selfJID_, timeStamp, true);
}
chatWindow_->show();
chatWindow_->setUnreadMessageCount(unreadMessages_.size());