Commit d926eab0 authored by Adrien Dorsaz's avatar Adrien Dorsaz

fix entity build

parent 9bb3f763
......@@ -407,7 +407,7 @@ class Client {
discoPubsubService(_entity, _node = null) {
console.log('client: discoPubsubService: starting');
let iqinfo = new IQ({
let iqInfo = new IQ({
from: this.config.jid,
to: _entity,
id: this.lastContractId++,
......@@ -426,7 +426,7 @@ class Client {
this.promise(iqInfoService, 'iq')
.then(
(iqResponse) => {
let entity = new Entity(iqResponse.getElementsByTagName('iq')[0].getAttribute('from'));
let entity = new Entity(iqResponse.getAttribute('from'));
let identities = iqResponse.getElementsByTagName('identity');
let features = iqResponse.getElementsByTagName('feature');
......
......@@ -9,13 +9,13 @@
*/
class Entity {
constructor(_jid) {
this.jid = _id;
this.jid = _jid;
// Services supported by the Entity
// key: category and type of the identity
// value: identity name
this.identities = new Map();
// Features and protocols supported by the entity
this.features = new Map();
this.features = [];
this.protocols = new Map();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment