summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-02-11 13:25:26 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-02-11 13:25:26 (GMT)
commitca01b263f9feea11822e41ccf94b01d3e38e5817 (patch)
tree8c20bc0b3b6541cf70c80b41f87c9681fbeb167c /Swift/Controllers/Chat/MUCController.cpp
parente81caa93d528bf7e73e66057093814371a538bf2 (diff)
downloadswift-contrib-ca01b263f9feea11822e41ccf94b01d3e38e5817.zip
swift-contrib-ca01b263f9feea11822e41ccf94b01d3e38e5817.tar.bz2
Don't mark MUC Context as unread.
Resolves: #724 Release-Notes: Historical messages received when joining a room will no longer be marked as unread.
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();
}
}