We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
look this
const { client, xml } = require('@xmpp/client') const debug = require('@xmpp/debug') export default (context, inject) => { const xmpp = client({ boshURL: 'https://gogo.so:7443/http-bind/', username: '[email protected]', password: '123456' }) debug(xmpp, true) xmpp.on('error', (err) => { console.error(err) }) xmpp.on('offline', () => { console.log('offline') }) xmpp.on('stanza', async (stanza) => { if (stanza.is('message')) { await xmpp.send(xml('presence', { type: 'unavailable' })) await xmpp.stop() } }) xmpp.on('online', async (address) => { // Makes itself available await xmpp.send(xml('presence')) // Sends a chat message to itself const message = xml( 'message', { type: 'chat', to: address }, xml('body', {}, 'hello world') ) await xmpp.send(message) }) xmpp.start().catch((err) => { console.error(err) }) }
result No compatible connection method found.
But I can connect normally with strophe.js like this
import Strophe from 'strophe.js' const conn = new Strophe.Connection('https://gogo.so:7443/http-bind/'); conn.connect([email protected], '123456', function (status) { if (status === Strophe.Status.CONNECTED) { } else if (status === Strophe.Status.DISCONNECTED) { } });
why ?? please help me
The text was updated successfully, but these errors were encountered:
xmpp.js does not support the HTTP transport method.
See https://github.com/xmppjs/xmpp.js/tree/master/packages/client#transports
Sorry, something went wrong.
thanks
#561
No branches or pull requests
look this
result No compatible connection method found.
But I can connect normally with strophe.js
like this
why ?? please help me
The text was updated successfully, but these errors were encountered: