{"action":"opened","issue":{"url":"https://api.github.com/repos/strophe/strophejs/issues/175","repository_url":"https://api.github.com/repos/strophe/strophejs","labels_url":"https://api.github.com/repos/strophe/strophejs/issues/175/labels{/name}","comments_url":"https://api.github.com/repos/strophe/strophejs/issues/175/comments","events_url":"https://api.github.com/repos/strophe/strophejs/issues/175/events","html_url":"https://github.com/strophe/strophejs/issues/175","id":135696192,"number":175,"title":"Passing null as first paremeter of 'restore' does not work","user":{"login":"bgaillard","id":1327782,"avatar_url":"https://avatars.githubusercontent.com/u/1327782?v=3","gravatar_id":"","url":"https://api.github.com/users/bgaillard","html_url":"https://github.com/bgaillard","followers_url":"https://api.github.com/users/bgaillard/followers","following_url":"https://api.github.com/users/bgaillard/following{/other_user}","gists_url":"https://api.github.com/users/bgaillard/gists{/gist_id}","starred_url":"https://api.github.com/users/bgaillard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgaillard/subscriptions","organizations_url":"https://api.github.com/users/bgaillard/orgs","repos_url":"https://api.github.com/users/bgaillard/repos","events_url":"https://api.github.com/users/bgaillard/events{/privacy}","received_events_url":"https://api.github.com/users/bgaillard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-23T10:22:50Z","updated_at":"2016-02-23T10:22:50Z","closed_at":null,"body":"Hi, in the exemples of Strophe.js we call the `restore` method with a `jid` equals to `null`. \r\n\r\nhttps://github.com/strophe/strophejs/blob/master/examples/restore.js#L64\r\n```javascript\r\ntry {\r\n    connection.restore(null, onConnect);\r\n} catch(e) {\r\n    if (e.name !== \"StropheSessionError\") { throw(e); }\r\n    $(button).show();\r\n}\r\n```\r\n\r\nBut in the source code of the `_restore` function the condition seems to be bad. \r\n\r\nhttps://github.com/strophe/strophejs/blob/master/strophe.js#L4483\r\n\r\n```javascript\r\n... || jid === \"null\" ...\r\n```\r\n\r\nSo we have to update the sample to this. \r\n```javascript\r\nconnection.restore('null', onConnect);\r\n```\r\n\r\nOr change the source code of the `_restore` function to this. \r\n```javascript\r\n... || jid === null ...\r\n```\r\n\r\nIs it correct ?\r\n"}}