forked from mirror/monocles_chat_clean
enable SM if it wasn’t enabled in bind 2
(cherry picked from commit 7eb160386d0c1a76084fab004c41d596009fc678)
This commit is contained in:
parent
d1f5057a3a
commit
378938778f
1 changed files with 6 additions and 3 deletions
|
@ -834,8 +834,13 @@ public class XmppConnection implements Runnable {
|
|||
final Element streamManagementEnabled =
|
||||
bound.findChild("enabled", Namespace.STREAM_MANAGEMENT);
|
||||
final Element carbonsEnabled = bound.findChild("enabled", Namespace.CARBONS);
|
||||
final boolean waitForDisco;
|
||||
if (streamManagementEnabled != null) {
|
||||
processEnabled(streamManagementEnabled);
|
||||
waitForDisco = true;
|
||||
} else {
|
||||
//if we didn’t enable stream managment in bind do it now
|
||||
waitForDisco = enableStreamManagement();
|
||||
}
|
||||
if (carbonsEnabled != null) {
|
||||
Log.d(
|
||||
|
@ -843,9 +848,7 @@ public class XmppConnection implements Runnable {
|
|||
account.getJid().asBareJid() + ": successfully enabled carbons");
|
||||
features.carbonsEnabled = true;
|
||||
}
|
||||
// TODO if we didn’t enable stream managment in bind do it now
|
||||
// TODO if both are set mark account ready for pipelining
|
||||
sendPostBindInitialization(streamManagementEnabled != null, carbonsEnabled != null);
|
||||
sendPostBindInitialization(waitForDisco, carbonsEnabled != null);
|
||||
}
|
||||
}
|
||||
this.quickStartInProgress = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue