{"action":"created","issue":{"url":"https://api.github.com/repos/strophe/strophejs/issues/172","labels_url":"https://api.github.com/repos/strophe/strophejs/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/strophe/strophejs/issues/172/comments","events_url":"https://api.github.com/repos/strophe/strophejs/issues/172/events","html_url":"https://github.com/strophe/strophejs/issues/172","id":127402349,"number":172,"title":"Strophe requires from attribute in iq response","user":{"login":"sualko","id":2974196,"avatar_url":"https://avatars.githubusercontent.com/u/2974196?v=3","gravatar_id":"","url":"https://api.github.com/users/sualko","html_url":"https://github.com/sualko","followers_url":"https://api.github.com/users/sualko/followers","following_url":"https://api.github.com/users/sualko/following{/other_user}","gists_url":"https://api.github.com/users/sualko/gists{/gist_id}","starred_url":"https://api.github.com/users/sualko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sualko/subscriptions","organizations_url":"https://api.github.com/users/sualko/orgs","repos_url":"https://api.github.com/users/sualko/repos","events_url":"https://api.github.com/users/sualko/events{/privacy}","received_events_url":"https://api.github.com/users/sualko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-19T09:28:00Z","updated_at":"2016-01-28T09:54:57Z","closed_at":null,"body":"As you can see in [src/core.js#L2043](https://github.com/strophe/strophejs/blob/master/src/core.js#L2043) Strophe requires that iq responses have a from attribute if you set a to attribute. This is conflicting to the [RFC6120](http://xmpp.org/rfcs/rfc6120.html#stanzas-semantics-iq) and therefore result in issues with Prosody 0.9.8. For example if you send a iq stanza to your own bar jid, prosody will send you the response without from attribute. A workaround is to remove the to attribute, but nevertheless this is a bug.\r\n\r\n```\r\n> <iq type=\"get\" to=\"klaus@localhost\" xmlns=\"jabber:client\" id=\"97d:sendIQ\"><vCard xmlns=\"vcard-temp\"/></iq>\r\n\r\n< <iq xmlns=\"jabber:client\" id=\"97d:sendIQ\" type=\"error\" to=\"klaus@localhost/429\"><error type=\"cancel\"><item-not-found xmlns=\"urn:ietf:params:xml:ns:xmpp-stanzas\"/></error></iq>\r\n```\r\n\r\n```\r\nerror: Got answer to IQ from wrong jid:null↵Expected jid: klaus@localhost↵undefined \r\n```"},"comment":{"url":"https://api.github.com/repos/strophe/strophejs/issues/comments/176093771","html_url":"https://github.com/strophe/strophejs/issues/172#issuecomment-176093771","issue_url":"https://api.github.com/repos/strophe/strophejs/issues/172","id":176093771,"user":{"login":"sualko","id":2974196,"avatar_url":"https://avatars.githubusercontent.com/u/2974196?v=3","gravatar_id":"","url":"https://api.github.com/users/sualko","html_url":"https://github.com/sualko","followers_url":"https://api.github.com/users/sualko/followers","following_url":"https://api.github.com/users/sualko/following{/other_user}","gists_url":"https://api.github.com/users/sualko/gists{/gist_id}","starred_url":"https://api.github.com/users/sualko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sualko/subscriptions","organizations_url":"https://api.github.com/users/sualko/orgs","repos_url":"https://api.github.com/users/sualko/repos","events_url":"https://api.github.com/users/sualko/events{/privacy}","received_events_url":"https://api.github.com/users/sualko/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T09:54:57Z","updated_at":"2016-01-28T09:54:57Z","body":"I will check the spec next week, if such an condition is mandatory and clean it up with a pr. "}}