summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-08-02 19:04:56 (GMT)
committerCatalin Badea <catalin.badea392@gmail.com>2012-08-02 19:04:56 (GMT)
commitb45019f8a762db0a15d249b22c85d55ad8f33e8b (patch)
treeb6a03144e232507789cc774c9f85f90e90ae9d26
parentd713997b926fa387b8209d7887344aba906a3fb2 (diff)
downloadswift-contrib-b45019f8a762db0a15d249b22c85d55ad8f33e8b.zip
swift-contrib-b45019f8a762db0a15d249b22c85d55ad8f33e8b.tar.bz2
Fix tests.
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index 68be032..745c9da 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -195,7 +195,7 @@ void MUCController::rejoin() {
muc_->setPassword(*password_);
}
//FIXME: check for received activity
- if (lastActivity_ == boost::posix_time::not_a_date_time) {
+ if (lastActivity_ == boost::posix_time::not_a_date_time && historyController_) {
lastActivity_ = historyController_->getLastTimeStampFromMUC(selfJID_, toJID_);
}
@@ -792,6 +792,10 @@ void MUCController::logMessage(const std::string& message, const JID& fromJID, c
}
void MUCController::addRecentLogs() {
+ if (!historyController_) {
+ return;
+ }
+
std::vector<HistoryMessage> messages = historyController_->getMUCContext(selfJID_, toJID_, lastActivity_);
foreach (const HistoryMessage& message, messages) {