diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-08-02 19:04:56 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-11 15:59:13 (GMT) |
commit | 2f793dfdc411ad0a18f3e145f9c2e5eca531dc04 (patch) | |
tree | 00087676b6272146400f86aa812e5a1c64f4a993 /Swift/Controllers/Chat | |
parent | 32df43a469e883898d23d45ef5dab79c02d3e179 (diff) | |
download | swift-contrib-2f793dfdc411ad0a18f3e145f9c2e5eca531dc04.zip swift-contrib-2f793dfdc411ad0a18f3e145f9c2e5eca531dc04.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) { |