summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-27 14:51:07 (GMT)
committerSwift Review <review@swift.im>2014-10-30 13:58:51 (GMT)
commit286ef105d813a12640d64b71101cafe53f212234 (patch)
tree39e3814048dd639b9a118a3b16f22b49235efd93 /Swiften/MUC/MUCImpl.h
parent190cdcf7478950a90a5c8666d82047e4f33e0d2c (diff)
downloadswift-286ef105d813a12640d64b71101cafe53f212234.zip
swift-286ef105d813a12640d64b71101cafe53f212234.tar.bz2
Resend presence to MUC on join completion only if it changed since join.
Test-Information: Added test case to assure presence is not resend after join completion if it did not change. The other test cases are untouched and still all succeed. Change-Id: I2aace1aee8ca3deab9cd9050a25233617b3b0678
Diffstat (limited to 'Swiften/MUC/MUCImpl.h')
-rw-r--r--Swiften/MUC/MUCImpl.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/Swiften/MUC/MUCImpl.h b/Swiften/MUC/MUCImpl.h
index 8eabb80..2979d70 100644
--- a/Swiften/MUC/MUCImpl.h
+++ b/Swiften/MUC/MUCImpl.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013 Kevin Smith
+ * Copyright (c) 2010-2014 Kevin Smith
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
*/
@@ -94,6 +94,12 @@ namespace Swift {
return ownMUCJID.getResource();
}
+ /**
+ * This function compares two Presence elements for equality based on to, from, status, show and entity capability information.
+ * @return True if equal; else otherwise.
+ */
+ static bool isEqualExceptID(const Presence& lhs, const Presence& rhs);
+
private:
void handleIncomingPresence(Presence::ref presence);
void internalJoin(const std::string& nick);
@@ -119,5 +125,6 @@ namespace Swift {
bool unlocking;
bool isUnlocked_;
boost::optional<std::string> password;
+ Presence::ref joinRequestPresence_;
};
}