summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/Chat/MUCController.cpp')
-rw-r--r--Swift/Controllers/Chat/MUCController.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/MUCController.cpp b/Swift/Controllers/Chat/MUCController.cpp
index e4c13af..156c6a2 100644
--- a/Swift/Controllers/Chat/MUCController.cpp
+++ b/Swift/Controllers/Chat/MUCController.cpp
@@ -53,6 +53,7 @@ MUCController::MUCController (
joined_ = false;
lastWasPresence_ = false;
shouldJoinOnReconnect_ = true;
+ doneGettingHistory_ = false;
events_ = uiEventStream;
roster_ = new Roster(false, true);
@@ -96,6 +97,7 @@ void MUCController::rejoin() {
if (parting_) {
joined_ = false;
parting_ = false;
+ doneGettingHistory_ = false;
//FIXME: check for received activity
if (lastActivity_ == boost::posix_time::not_a_date_time) {
muc_->joinAs(nick_);
@@ -256,6 +258,15 @@ void MUCController::preHandleIncomingMessage(boost::shared_ptr<MessageEvent> mes
if (!message->getSubject().isEmpty() && message->getBody().isEmpty()) {
chatWindow_->addSystemMessage("The room subject is now: " + message->getSubject());
+ doneGettingHistory_ = true;
+ }
+
+ if (!doneGettingHistory_ && !message->getPayload<Delay>()) {
+ doneGettingHistory_ = true;
+ }
+
+ if (!doneGettingHistory_) {
+ messageEvent->conclude();
}
}