summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-05-04 14:15:53 (GMT)
committerTobias Markmann <tm@ayena.de>2016-05-04 14:43:41 (GMT)
commitb2d3eae9fd085cd91b3efac53dca81fd450d5393 (patch)
tree0bdb6f7359ffdd69ee81203e8faa435eaff7c633 /Swiften/Client
parent6af098245b58d484d9c86c1f832588455410750b (diff)
downloadswift-b2d3eae9fd085cd91b3efac53dca81fd450d5393.zip
swift-b2d3eae9fd085cd91b3efac53dca81fd450d5393.tar.bz2
Fix /me message handling for highlighted messages
Test-Information: Added a unit test to test for the fix. Tests pass on OS X 10.11.4. Change-Id: Ibf071ae47663bfefdc856339932de6a1fe4a642d
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/DummyStanzaChannel.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Swiften/Client/DummyStanzaChannel.h b/Swiften/Client/DummyStanzaChannel.h
index 48b611c..fc2f05b 100644
--- a/Swiften/Client/DummyStanzaChannel.h
+++ b/Swiften/Client/DummyStanzaChannel.h
@@ -79,6 +79,16 @@ namespace Swift {
return std::dynamic_pointer_cast<T>(sentStanzas[index]);
}
+ template<typename T> size_t countSentStanzaOfType() {
+ size_t count = 0;
+ for (auto& stanza : sentStanzas) {
+ if (std::dynamic_pointer_cast<T>(stanza)) {
+ count++;
+ }
+ }
+ return count;
+ }
+
std::vector<Certificate::ref> getPeerCertificateChain() const {
return std::vector<Certificate::ref>();
}