summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/XMPPEvents')
-rw-r--r--Swift/Controllers/XMPPEvents/MessageEvent.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/Swift/Controllers/XMPPEvents/MessageEvent.h b/Swift/Controllers/XMPPEvents/MessageEvent.h
index be8b1b0..b5b1215 100644
--- a/Swift/Controllers/XMPPEvents/MessageEvent.h
+++ b/Swift/Controllers/XMPPEvents/MessageEvent.h
@@ -1,17 +1,19 @@
/*
- * Copyright (c) 2010-2012 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
+
#include <cassert>
#include <boost/shared_ptr.hpp>
-#include <Swift/Controllers/XMPPEvents/StanzaEvent.h>
#include <Swiften/Elements/Message.h>
+#include <Swift/Controllers/XMPPEvents/StanzaEvent.h>
+
namespace Swift {
class MessageEvent : public StanzaEvent {
public:
@@ -22,7 +24,7 @@ namespace Swift {
boost::shared_ptr<Message> getStanza() {return stanza_;}
bool isReadable() {
- return getStanza()->isError() || !getStanza()->getBody().empty();
+ return getStanza()->isError() || !getStanza()->getBody().get_value_or("").empty();
}
void read() {