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.
This commit is contained in:
Zaid Abdulla committed 2021-01-05 18:05:19 -08:00
1 parent 081201cd2f
commit ccfbcddeda
1 file changed
-2
-2
View File
@@ -295,12 +295,10 @@ 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;
}
}
}
return 0;
}