diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 12:02:47 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-11 15:52:56 (GMT) |
commit | fc40104bf6e6d915561f95015e0b5617d97880e4 (patch) | |
tree | bbe91142e4c4dfcdaf32d4041694a8834a6683d8 /Swift/Controllers/Chat/ChatControllerBase.cpp | |
parent | 9f11ec4954b7c860623c799827e73c40e73acfac (diff) | |
download | swift-contrib-fc40104bf6e6d915561f95015e0b5617d97880e4.zip swift-contrib-fc40104bf6e6d915561f95015e0b5617d97880e4.tar.bz2 |
Log messages to the sqlite db and dump all messages in the history viewer
Diffstat (limited to 'Swift/Controllers/Chat/ChatControllerBase.cpp')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index f17e7c4..388f2c4 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -148,7 +148,7 @@ void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool onActivity(message->getBody()); // log message - historyController_->addMessage(getBaseJID(), selfJID_, toJID_, body, now); + historyController_->addMessage(getBaseJID(), selfJID_, std::string("me"), body, now); } void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog> catalog, ErrorPayload::ref error) { @@ -255,8 +255,7 @@ 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); - // void HistoryController::addMessage(const JID& baseJID, const JID& fromJID, const JID& toJID, std::string messageBody, boost::posix_time::ptime timeStamp) { - historyController_->addMessage(getBaseJID(), from, message->getTo(), body, timeStamp); + historyController_->addMessage(getBaseJID(), from, senderDisplayNameFromMessage(from), body, timeStamp); } } chatWindow_->show(); |