summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-27 15:31:32 (GMT)
committerSwift Review <review@swift.im>2014-10-30 13:59:15 (GMT)
commit6e87ef3a842094483105df4e6333c90964a69a47 (patch)
tree3fa5cab2d45844f0cf1cdf350a02586350a9f7f4 /Swiften/MUC
parent286ef105d813a12640d64b71101cafe53f212234 (diff)
downloadswift-6e87ef3a842094483105df4e6333c90964a69a47.zip
swift-6e87ef3a842094483105df4e6333c90964a69a47.tar.bz2
Only call MUC::onJoinComplete signal once per MUC join.
Old versions of Prosody do not support instant rooms, i.e. do not respond to the data form submit. It also pretends all rooms exist all the time and thus will never send status 201. This change will mark the room join as complete if we didn't receive status 201 but the join was otherwise successful. Test-Information: Tested this change against M-Link, Prosody nightly (which behaves according to XEP-0045), Prosody 0.9 (which eats the data form submit for instant rooms), and Openfire with Swift. Change-Id: I63f5488433110231ca7d0a6834161a2acd2cfc73
Diffstat (limited to 'Swiften/MUC')
-rw-r--r--Swiften/MUC/MUCImpl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Swiften/MUC/MUCImpl.cpp b/Swiften/MUC/MUCImpl.cpp
index 778c290..16e7421 100644
--- a/Swiften/MUC/MUCImpl.cpp
+++ b/Swiften/MUC/MUCImpl.cpp
@@ -266,7 +266,6 @@ void MUCImpl::handleIncomingPresence(Presence::ref presence) {
ownMUCJID = presence->getFrom();
presenceSender->addDirectedPresenceReceiver(ownMUCJID, DirectedPresenceSender::AndSendPresence);
}
- onJoinComplete(getOwnNick());
}
// MUC status 201: a new room has been created
if (status.code == 201) {
@@ -293,6 +292,9 @@ void MUCImpl::handleIncomingPresence(Presence::ref presence) {
}
}
}
+ if (joinComplete_ && !isLocked) {
+ onJoinComplete(getOwnNick());
+ }
if (!isLocked && !isUnlocked_ && (presence->getFrom() == ownMUCJID)) {
isUnlocked_ = true;
onUnlocked();