summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/Chat/ChatController.cpp')
-rw-r--r--Swift/Controllers/Chat/ChatController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/Controllers/Chat/ChatController.cpp b/Swift/Controllers/Chat/ChatController.cpp
index 924ca97..9046dc3 100644
--- a/Swift/Controllers/Chat/ChatController.cpp
+++ b/Swift/Controllers/Chat/ChatController.cpp
@@ -134,6 +134,11 @@ void ChatController::setEnabled(bool enabled) {
chatWindow_->setAckState(it->second, ChatWindow::Failed);
}
unackedStanzas_.clear();
+
+ Presence::ref fakeOffline(new Presence());
+ fakeOffline->setFrom(toJID_);
+ fakeOffline->setType(Presence::Unavailable);
+ chatStateTracker_->handlePresenceChange(fakeOffline);
}
ChatControllerBase::setEnabled(enabled);
}