summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-06-27 17:53:07 (GMT)
committerCătălin Badea <catalin.badea392@gmail.com>2012-08-11 15:52:57 (GMT)
commitf9b22479a43e95ecee326be3da719397b87fe6eb (patch)
tree306f03e404da6cbaa39e58e5d1ed83a647effc59 /Swift/Controllers/Chat
parentfc40104bf6e6d915561f95015e0b5617d97880e4 (diff)
downloadswift-contrib-f9b22479a43e95ecee326be3da719397b87fe6eb.zip
swift-contrib-f9b22479a43e95ecee326be3da719397b87fe6eb.tar.bz2
Display conversations by using roster selection
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r--Swift/Controllers/Chat/ChatControllerBase.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp
index 388f2c4..ee3a027 100644
--- a/Swift/Controllers/Chat/ChatControllerBase.cpp
+++ b/Swift/Controllers/Chat/ChatControllerBase.cpp
@@ -148,7 +148,9 @@ void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool
onActivity(message->getBody());
// log message
- historyController_->addMessage(getBaseJID(), selfJID_, std::string("me"), body, now);
+ if (historyController_) {
+ historyController_->addMessage(getBaseJID(), selfJID_, std::string("me"), body, now);
+ }
}
void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog> catalog, ErrorPayload::ref error) {
@@ -255,7 +257,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);
- historyController_->addMessage(getBaseJID(), from, senderDisplayNameFromMessage(from), body, timeStamp);
+ if (historyController_) {
+ historyController_->addMessage(getBaseJID(), from, senderDisplayNameFromMessage(from), body, timeStamp);
+ }
}
}
chatWindow_->show();