strophe ライブラリを使用して、openfire サーバーに正常に接続しました。
会議室からすべてのユーザーを返す JavaScript 関数が必要です。
別の質問: 現在のユーザーのステータスを設定/取得するにはどうすればよいですか?
私の現在のコード:
$(document).ready(function() {
connection = new Strophe.Connection(BOSH_SERVICE);
connection.connect("null",
"null",
onConnect);
});
function onConnect(status)
{
if (status == Strophe.Status.CONNECTED) {
$('#notifications').html('<p class="welcome">Hello! Any new posts will appear below.</p>');
connection.addHandler(notifyUser, null, 'message', null, null, null);
console.log('send ');
var pres = $pres({to: 'chat@conference.neo-pc/catalin'});
connection.send(pres);
}
}