diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-08-02 19:04:56 (GMT) |
---|---|---|
committer | Catalin Badea <catalin.badea392@gmail.com> | 2012-08-02 19:04:56 (GMT) |
commit | b45019f8a762db0a15d249b22c85d55ad8f33e8b (patch) | |
tree | b6a03144e232507789cc774c9f85f90e90ae9d26 /Swift/Controllers/Chat | |
parent | d713997b926fa387b8209d7887344aba906a3fb2 (diff) | |
download | swift-contrib-b45019f8a762db0a15d249b22c85d55ad8f33e8b.zip swift-contrib-b45019f8a762db0a15d249b22c85d55ad8f33e8b.tar.bz2 |
Fix tests.
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 6 |
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) { |