diff options
author | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-21 17:45:40 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-21 17:46:49 (GMT) |
commit | 8539b9f1ef656147196ae57a3403b321d1032513 (patch) | |
tree | 99525b4b746a9e71a0e811b70e7c49be86ee9521 /Swift/Controllers/Chat | |
parent | e5548caf08dbb4fe4208a23ece9e8e9e0667a8dd (diff) | |
download | swift-contrib-catalinb/history2.zip swift-contrib-catalinb/history2.tar.bz2 |
Add experimental flags.catalinb/history2
Diffstat (limited to 'Swift/Controllers/Chat')
-rw-r--r-- | Swift/Controllers/Chat/ChatControllerBase.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/Chat/MUCController.cpp | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/Swift/Controllers/Chat/ChatControllerBase.cpp b/Swift/Controllers/Chat/ChatControllerBase.cpp index 754401b..b5fe0c0 100644 --- a/Swift/Controllers/Chat/ChatControllerBase.cpp +++ b/Swift/Controllers/Chat/ChatControllerBase.cpp @@ -146,7 +146,9 @@ void ChatControllerBase::handleSendMessageRequest(const std::string &body, bool postSendMessage(message->getBody(), boost::dynamic_pointer_cast<Stanza>(message)); onActivity(message->getBody()); +#ifdef SWIFT_EXPERIMENTAL_HISTORY logMessage(body, selfJID_, toJID_, now, false); +#endif } void ChatControllerBase::handleSecurityLabelsCatalogResponse(boost::shared_ptr<SecurityLabelsCatalog> catalog, ErrorPayload::ref error) { diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp index b2ba871..fcd1f04 100644 --- a/Swift/Controllers/Chat/MUCController.cpp +++ b/Swift/Controllers/Chat/MUCController.cpp @@ -195,11 +195,14 @@ void MUCController::rejoin() { muc_->setPassword(*password_); } //FIXME: check for received activity +#ifdef SWIFT_EXPERIMENTAL_HISTORY if (lastActivity_ == boost::posix_time::not_a_date_time && historyController_) { lastActivity_ = historyController_->getLastTimeStampFromMUC(selfJID_, toJID_); } - muc_->joinWithContextSince(nick_, lastActivity_); +#else + muc_->joinAs(nick_); +#endif } } @@ -276,7 +279,9 @@ void MUCController::handleJoinComplete(const std::string& nick) { nick_ = nick; chatWindow_->addSystemMessage(joinMessage); +#ifdef SWIFT_EXPERIMENTAL_HISTORY addRecentLogs(); +#endif clearPresenceQueue(); shouldJoinOnReconnect_ = true; |