openfireサーバーにstropheプラグインを使用して新しいユーザーを登録しようとしていますが、登録に接続しません。ここでの説明https://github.com/metajack/strophejs-plugins/tree/master/registerはそれ以上は:(私は前に接続を確立する必要がありますか私をもたらすものではありません。これは、登録するボタンをクリックしたときに、私がしようとするものである:?この行でXEP-0077 Strophe.jsとopenfireの使用による帯域内登録
$("#RegButton").click(function() {
var callback = function (status) {
if (status === Strophe.Status.REGISTER) {
connection.register.fields.username = "juliet";
connection.register.fields.password = "R0m30";
connection.register.submit();
} else if (status === Strophe.Status.REGISTERED) {
console.log("registered!");
connection.authenticate();
} else if (status === Strophe.Status.CONNECTED) {
console.log("logged in!");
} else {
// every other status a connection.connect would receive
}
};
connection.register.connect("http://localhost:7070/http-bind/", callback);
});
私もstrophe.register.jsと同じ問題があり、同じ行をコメントアウトして回避しました。私はXMPPサーバーとして韻律を使用しています。どのサーバーを使用していますか? – Ando