summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-04-26 16:52:12 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-26 16:52:12 (GMT)
commitbc08209eedf8a8a9f2506420384201e2bd0035d4 (patch)
treeeafae0f103389d6e1f1511dfe363b39395a2e4f2 /Swift/Controllers/XMPPEvents
parent4a1f206b0f8d4926b3a61cc8d7aad217761e52f6 (diff)
downloadswift-bc08209eedf8a8a9f2506420384201e2bd0035d4.zip
swift-bc08209eedf8a8a9f2506420384201e2bd0035d4.tar.bz2
Only include targeted messages in the Chats view count for MUCs.
Resolves: #935
Diffstat (limited to 'Swift/Controllers/XMPPEvents')
-rw-r--r--Swift/Controllers/XMPPEvents/MessageEvent.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/Swift/Controllers/XMPPEvents/MessageEvent.h b/Swift/Controllers/XMPPEvents/MessageEvent.h
index d1021dc..1093470 100644
--- a/Swift/Controllers/XMPPEvents/MessageEvent.h
+++ b/Swift/Controllers/XMPPEvents/MessageEvent.h
@@ -1,26 +1,23 @@
/*
- * Copyright (c) 2010 Kevin Smith
+ * Copyright (c) 2010-2012 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
-#ifndef SWIFTEN_MessageEvent_H
-#define SWIFTEN_MessageEvent_H
-
+#pragma once
#include <cassert>
-#include "Swiften/Base/boost_bsignals.h"
#include <boost/shared_ptr.hpp>
-#include "Swift/Controllers/XMPPEvents/StanzaEvent.h"
-#include "Swiften/Elements/Message.h"
+#include <Swift/Controllers/XMPPEvents/StanzaEvent.h>
+#include <Swiften/Elements/Message.h>
namespace Swift {
class MessageEvent : public StanzaEvent {
public:
typedef boost::shared_ptr<MessageEvent> ref;
- MessageEvent(boost::shared_ptr<Message> stanza) : stanza_(stanza){};
+ MessageEvent(boost::shared_ptr<Message> stanza) : stanza_(stanza), targetsMe_(true) {};
boost::shared_ptr<Message> getStanza() {return stanza_;}
@@ -33,9 +30,17 @@ namespace Swift {
conclude();
}
+ void setTargetsMe(bool targetsMe) {
+ targetsMe_ = targetsMe;
+ }
+
+ bool targetsMe() const {
+ return targetsMe_;
+ }
+
private:
boost::shared_ptr<Message> stanza_;
+ bool targetsMe_;
};
}
-#endif