diff options
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(); |