diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 12:02:47 (GMT) |
---|---|---|
committer | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 12:02:47 (GMT) |
commit | 0998d6a8f138e0fd00245fc3c1efc8878fa7b888 (patch) | |
tree | d728ad825753ec227ee190a2953db4315cf85d88 /Swift/Controllers/Chat | |
parent | ad7d00c25b74d212457fa599861c5583e79e7c13 (diff) | |
download | swift-contrib-0998d6a8f138e0fd00245fc3c1efc8878fa7b888.zip swift-contrib-0998d6a8f138e0fd00245fc3c1efc8878fa7b888.tar.bz2 |
Log messages to the sqlite db and dump all messages in the history viewer
Diffstat (limited to 'Swift/Controllers/Chat')
-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 bf39216..302f793 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -145,7 +145,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) { @@ -252,8 +252,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(); |