Reputation: 1470
I'm trying to connect with node to a local openfire server using the node-xmpp-client package.
npm install node-xmpp-client
I've configurated the server and i've created a user test1 with password: 'password' and email: '[email protected]'
This is my client.js file
var request = require('request');
var util = require('util');
var Client = require('node-xmpp-client');
var client = new Client({
jid: //?
password: "password",
});
client.on('online', function(){
console.log('online');
});
I don't really get what i should insert in the jid variable.
Someone has faced a similar situation? Thanks in advance for all the help
Upvotes: 0
Views: 608
Reputation: 247
jid
stands for "Jabber ID" - an identification of an XMPP
client.
In your case the string "[email protected]"
should work. It may also include so called resource (as several clients may be registered to the same account in dialogs there may be a need to address specific device).
With an optional resource string JID
looks like "[email protected]/myclient"
.
Upvotes: 2