{"action":"created","issue":{"url":"https://api.github.com/repos/otalk/jingle.js/issues/34","repository_url":"https://api.github.com/repos/otalk/jingle.js","labels_url":"https://api.github.com/repos/otalk/jingle.js/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/otalk/jingle.js/issues/34/comments","events_url":"https://api.github.com/repos/otalk/jingle.js/issues/34/events","html_url":"https://github.com/otalk/jingle.js/issues/34","id":161281147,"number":34,"title":"Results aren't processed.","user":{"login":"xdumaine","id":833911,"avatar_url":"https://avatars.githubusercontent.com/u/833911?v=3","gravatar_id":"","url":"https://api.github.com/users/xdumaine","html_url":"https://github.com/xdumaine","followers_url":"https://api.github.com/users/xdumaine/followers","following_url":"https://api.github.com/users/xdumaine/following{/other_user}","gists_url":"https://api.github.com/users/xdumaine/gists{/gist_id}","starred_url":"https://api.github.com/users/xdumaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xdumaine/subscriptions","organizations_url":"https://api.github.com/users/xdumaine/orgs","repos_url":"https://api.github.com/users/xdumaine/repos","events_url":"https://api.github.com/users/xdumaine/events{/privacy}","received_events_url":"https://api.github.com/users/xdumaine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-20T20:02:43Z","updated_at":"2016-06-20T21:02:27Z","closed_at":null,"body":"Results are sent ([source](https://github.com/otalk/jingle.js/blob/master/index.js#L396)):\r\n\r\n```javascript\r\n    session.process(action, req.jingle, function (err) {\r\n        if (err) {\r\n            ......\r\n        } else {\r\n            self.emit('send', {\r\n                to: sender,\r\n                id: rid,\r\n                type: 'result',\r\n            });\r\n            ......\r\n        }\r\n    });\r\n```\r\n\r\nBut when processed ([source](https://github.com/otalk/jingle.js/blob/master/index.js#L263)): \r\n\r\n```javascript\r\n    var self = this;\r\n\r\n    // Extract the request metadata that we need to verify\r\n    var sid = !!req.jingle ? req.jingle.sid : null;\r\n    var session = this.sessions[sid] || null;\r\n    var rid = req.id;\r\n    var sender = req.from.full || req.from;\r\n\r\n    if (req.type === 'error') {\r\n        ......\r\n    }\r\n\r\n    if (req.type === 'result') {\r\n        if (session) {\r\n            session.pendingAction = false;\r\n        }\r\n        return;\r\n    }\r\n```\r\n\r\n`sid` is not included in results, so the `session` is never found, and `pendingAction` is never cleared."},"comment":{"url":"https://api.github.com/repos/otalk/jingle.js/issues/comments/227268555","html_url":"https://github.com/otalk/jingle.js/issues/34#issuecomment-227268555","issue_url":"https://api.github.com/repos/otalk/jingle.js/issues/34","id":227268555,"user":{"login":"xdumaine","id":833911,"avatar_url":"https://avatars.githubusercontent.com/u/833911?v=3","gravatar_id":"","url":"https://api.github.com/users/xdumaine","html_url":"https://github.com/xdumaine","followers_url":"https://api.github.com/users/xdumaine/followers","following_url":"https://api.github.com/users/xdumaine/following{/other_user}","gists_url":"https://api.github.com/users/xdumaine/gists{/gist_id}","starred_url":"https://api.github.com/users/xdumaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xdumaine/subscriptions","organizations_url":"https://api.github.com/users/xdumaine/orgs","repos_url":"https://api.github.com/users/xdumaine/repos","events_url":"https://api.github.com/users/xdumaine/events{/privacy}","received_events_url":"https://api.github.com/users/xdumaine/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T21:02:27Z","updated_at":"2016-06-20T21:02:27Z","body":"@fippo @legastero looks like results don't take a `<jingle/>` node inside them - thoughts on how to fix this one?"}}
{"actor":{"display_login":"xdumaine"}}