From 7eb160386d0c1a76084fab004c41d596009fc678 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 14 Oct 2022 13:29:59 +0200 Subject: [PATCH] =?UTF-8?q?enable=20SM=20if=20it=20wasn=E2=80=99t=20enable?= =?UTF-8?q?d=20in=20bind=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/eu/siacs/conversations/xmpp/XmppConnection.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java index aaf40edf7..b467d8dc7 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java @@ -780,8 +780,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( @@ -789,9 +794,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;