summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Elements/DiscoInfo.cpp')
-rw-r--r--Swiften/Elements/DiscoInfo.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/Elements/DiscoInfo.cpp b/Swiften/Elements/DiscoInfo.cpp
index f0e728e..158ea66 100644
--- a/Swiften/Elements/DiscoInfo.cpp
+++ b/Swiften/Elements/DiscoInfo.cpp
@@ -6,6 +6,8 @@
#include "Swiften/Elements/DiscoInfo.h"
+#include <algorithm>
+
namespace Swift {
const std::string DiscoInfo::ChatStatesFeature = std::string("http://jabber.org/protocol/chatstates");
@@ -33,4 +35,8 @@ bool DiscoInfo::Identity::operator<(const Identity& other) const {
}
}
+bool DiscoInfo::hasFeature(const std::string& feature) const {
+ return std::find(features_.begin(), features_.end(), feature) != features_.end();
+}
+
}