From ccfbcddedab5173ced9fe6c2b2055514f90bd37d Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Tue, 5 Jan 2021 18:05:19 -0800 Subject: [PATCH] Always bind resource to XMPP stream The XMPP server may not flag the bind feature as required but we're still required to bind resource to the stream in order to be able to send IQ stanzas to other clients. --- lib/xmpp-client.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/xmpp-client.ts b/lib/xmpp-client.ts index 4d1d6de..37b86d3 100644 --- a/lib/xmpp-client.ts +++ b/lib/xmpp-client.ts @@ -295,10 +295,8 @@ function* init( throw new Error("No supported SASL method"); } } else if (feature.name === "bind") { - if (feature.children.some((c) => c.name === "required")) { - yield* bind(socket, resource); - return 0; - } + yield* bind(socket, resource); + return 0; } } return 0;