{"action":"closed","issue":{"url":"https://api.github.com/repos/legastero/stanza.io/issues/71","repository_url":"https://api.github.com/repos/legastero/stanza.io","labels_url":"https://api.github.com/repos/legastero/stanza.io/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/legastero/stanza.io/issues/71/comments","events_url":"https://api.github.com/repos/legastero/stanza.io/issues/71/events","html_url":"https://github.com/legastero/stanza.io/issues/71","id":53092108,"number":71,"title":"client.getDiscoInfo broken in 7.0.1 (6eee99e)","user":{"login":"kdex","id":4442505,"avatar_url":"https://avatars.githubusercontent.com/u/4442505?v=3","gravatar_id":"","url":"https://api.github.com/users/kdex","html_url":"https://github.com/kdex","followers_url":"https://api.github.com/users/kdex/followers","following_url":"https://api.github.com/users/kdex/following{/other_user}","gists_url":"https://api.github.com/users/kdex/gists{/gist_id}","starred_url":"https://api.github.com/users/kdex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdex/subscriptions","organizations_url":"https://api.github.com/users/kdex/orgs","repos_url":"https://api.github.com/users/kdex/repos","events_url":"https://api.github.com/users/kdex/events{/privacy}","received_events_url":"https://api.github.com/users/kdex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2014-12-30T04:15:11Z","updated_at":"2017-02-02T09:33:15Z","closed_at":"2017-02-02T09:33:15Z","body":"I've noticed a small non-determinism when calling `client.getDiscoInfo()`.\r\n\r\nWhen `client.getDiscoInfo()` is executed in 7.0.1 providing it the client's own full JID, sometimes the discoInfo returned is an empty object (that is: There aren't even fields such as `features`, `extensions`, etc.).\r\n\r\nGiven this call:\r\n\r\n```\r\nclient.getDiscoInfo(\"anon@kdex.de/ratchet-84ea08c8-c332-410d-8965-03f340dcbfb1\", null, function(error, reply) {\r\n    console.warn(\"Here is the discoInfo: \", reply.discoInfo);\r\n});\r\n```\r\n\r\nThe raw responses look like this:\r\n\r\n```\r\nraw:outgoing <iq xmlns=\"jabber:client\" to=\"anon@kdex.de/ratchet-84ea08c8-c332-410d-8965-03f340dcbfb1\" type=\"get\" id=\"6de5f060-4ef2-469d-a932-c544854797d2\"><query xmlns=\"http://jabber.org/protocol/disco#info\"/></iq>\r\nraw:outgoing <r xmlns=\"urn:xmpp:sm:3\"/>\r\niq:get:discoInfo Object {discoInfo: Object, id: \"6de5f060-4ef2-469d-a932-c544854797d2\", to: 235.n.JID, from: 235.n.JID, type: \"get\"…}\r\niq Object {discoInfo: Object, id: \"6de5f060-4ef2-469d-a932-c544854797d2\", to: 235.n.JID, from: 235.n.JID, type: \"get\"…}\r\nstanza Object {discoInfo: Object, id: \"6de5f060-4ef2-469d-a932-c544854797d2\", to: 235.n.JID, from: 235.n.JID, type: \"get\"…}\r\nid:6de5f060-4ef2-469d-a932-c544854797d2 Object {discoInfo: Object, id: \"6de5f060-4ef2-469d-a932-c544854797d2\", to: 235.n.JID, from: 235.n.JID, type: \"get\"…}\r\nstream:data i {xml: n, _extensions: Object, _name: \"iq\", _eventname: undefined, _NS: \"jabber:client\"…}\r\n raw:incoming <iq type='get' to='anon@kdex.de/ratchet-84ea08c8-c332-410d-8965-03f340dcbfb1' from='anon@kdex.de/ratchet-84ea08c8-c332-410d-8965-03f340dcbfb1' id='6de5f060-4ef2-469d-a932-c544854797d2' xmlns='jabber:client'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>\r\n Here is the discoInfo:  Object {}\r\n raw:outgoing <iq xmlns=\"jabber:client\" to=\"anon@kdex.de/ratchet-84ea08c8-c332-410d-8965-03f340dcbfb1\" id=\"6de5f060-4ef2-469d-a932-c544854797d2\" type=\"result\"><query xmlns=\"http://jabber.org/protocol/disco#info\"><identity category=\"client\" type=\"web\"/></query></iq>\r\n stream:management:ack Object {h: 28}\r\nstanza:acked i {xml: n, _extensions: Object, _name: \"iq\", _eventname: undefined, _NS: \"jabber:client\"…}\r\nstream:data i {xml: n, _extensions: Object, lang: \"\", _name: \"smAck\", _eventname: \"stream:management:ack\"…}\r\nraw:incoming <a h='28' xmlns='urn:xmpp:sm:3'/>\r\nraw:outgoing <r xmlns=\"urn:xmpp:sm:3\"/>\r\niq Object {discoInfo: Object, id: \"6de5f060-4ef2-469d-a932-c544854797d2\", to: 235.n.JID, from: 235.n.JID, type: \"result\"…}\r\nstanza Object {discoInfo: Object, id: \"6de5f060-4ef2-469d-a932-c544854797d2\", to: 235.n.JID, from: 235.n.JID, type: \"result\"…}\r\nid:6de5f060-4ef2-469d-a932-c544854797d2 Object {discoInfo: Object, id: \"6de5f060-4ef2-469d-a932-c544854797d2\", to: 235.n.JID, from: 235.n.JID, type: \"result\"…}\r\nstream:data i {xml: n, _extensions: Object, _name: \"iq\", _eventname: undefined, _NS: \"jabber:client\"…}\r\nraw:incoming <iq type='result' to='anon@kdex.de/ratchet-84ea08c8-c332-410d-8965-03f340dcbfb1' from='anon@kdex.de/ratchet-84ea08c8-c332-410d-8965-03f340dcbfb1' id='6de5f060-4ef2-469d-a932-c544854797d2' xmlns='jabber:client'><query xmlns='http://jabber.org/protocol/disco#info'><identity type='web' category='client'/></query></iq>\r\nstream:management:ack Object {h: 29}\r\nstanza:acked i {xml: n, _extensions: Object, _name: \"iq\", _eventname: undefined, _NS: \"jabber:client\"…}\r\nstream:data i {xml: n, _extensions: Object, lang: \"\", _name: \"smAck\", _eventname: \"stream:management:ack\"…}\r\nraw:incoming <a h='29' xmlns='urn:xmpp:sm:3'/>\r\n```\r\n\r\nNote that first, the success handler is executed using a **prematurely** built object (it's completely empty). In the further response, the object seems to be built. Note that even though the object is built, important properties (such as `features`) are missing.\r\n\r\nProviding another JID than the own client's will result in the same behavior. It seems currently impossible to get another stanza.io client's `features`.\r\n\r\nFunction calls like these (that is, getting my own disco info) shouldn't be necessary anyway (I know that this information is stored in `client.disco`), but AFAIR this **did** work in 6.x.\r\n\r\nIs this still compliant to the standard? It feels like a bug, though.\r\n"}}
{"actor":{"display_login":"kdex"}}