diff options
Diffstat (limited to 'Swift/Controllers/EventController.cpp')
-rw-r--r-- | Swift/Controllers/EventController.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Swift/Controllers/EventController.cpp b/Swift/Controllers/EventController.cpp index 70d56c7..bf24ff0 100644 --- a/Swift/Controllers/EventController.cpp +++ b/Swift/Controllers/EventController.cpp @@ -10,6 +10,7 @@ #include <algorithm> #include "Swiften/Events/MessageEvent.h" +#include "Swiften/Events/ErrorEvent.h" #include "Swiften/Events/SubscriptionRequestEvent.h" namespace Swift { @@ -20,7 +21,8 @@ EventController::EventController() { void EventController::handleIncomingEvent(boost::shared_ptr<StanzaEvent> sourceEvent) { boost::shared_ptr<MessageEvent> messageEvent = boost::dynamic_pointer_cast<MessageEvent>(sourceEvent); boost::shared_ptr<SubscriptionRequestEvent> subscriptionEvent = boost::dynamic_pointer_cast<SubscriptionRequestEvent>(sourceEvent); - if ((messageEvent && messageEvent->isReadable()) || subscriptionEvent) { + boost::shared_ptr<ErrorEvent> errorEvent = boost::dynamic_pointer_cast<ErrorEvent>(sourceEvent); + if ((messageEvent && messageEvent->isReadable()) || subscriptionEvent || errorEvent) { events_.push_back(sourceEvent); sourceEvent->onConclusion.connect(boost::bind(&EventController::handleEventConcluded, this, sourceEvent)); onEventQueueLengthChange(events_.size()); |