{"action":"opened","issue":{"url":"https://api.github.com/repos/Welfenlab/tutor-student/issues/23","labels_url":"https://api.github.com/repos/Welfenlab/tutor-student/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/Welfenlab/tutor-student/issues/23/comments","events_url":"https://api.github.com/repos/Welfenlab/tutor-student/issues/23/events","html_url":"https://github.com/Welfenlab/tutor-student/issues/23","id":111070637,"number":23,"title":"Save pending sharejs operations ","user":{"login":"fasib","id":317216,"avatar_url":"https://avatars.githubusercontent.com/u/317216?v=3","gravatar_id":"","url":"https://api.github.com/users/fasib","html_url":"https://github.com/fasib","followers_url":"https://api.github.com/users/fasib/followers","following_url":"https://api.github.com/users/fasib/following{/other_user}","gists_url":"https://api.github.com/users/fasib/gists{/gist_id}","starred_url":"https://api.github.com/users/fasib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasib/subscriptions","organizations_url":"https://api.github.com/users/fasib/orgs","repos_url":"https://api.github.com/users/fasib/repos","events_url":"https://api.github.com/users/fasib/events{/privacy}","received_events_url":"https://api.github.com/users/fasib/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Welfenlab/tutor-student/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"fasib","id":317216,"avatar_url":"https://avatars.githubusercontent.com/u/317216?v=3","gravatar_id":"","url":"https://api.github.com/users/fasib","html_url":"https://github.com/fasib","followers_url":"https://api.github.com/users/fasib/followers","following_url":"https://api.github.com/users/fasib/following{/other_user}","gists_url":"https://api.github.com/users/fasib/gists{/gist_id}","starred_url":"https://api.github.com/users/fasib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasib/subscriptions","organizations_url":"https://api.github.com/users/fasib/orgs","repos_url":"https://api.github.com/users/fasib/repos","events_url":"https://api.github.com/users/fasib/events{/privacy}","received_events_url":"https://api.github.com/users/fasib/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-10-12T22:54:08Z","updated_at":"2015-10-12T22:54:08Z","closed_at":null,"body":"The pending shajrejs operations should be safed to the localStorage, just in case that someone closes the window/tab with pending sharejs doc updates.\r\n\r\ne.g:\r\n```\r\nif not connected && pendingData\r\n  localStorage.setItem(\"DConv:partB\", JSON.stringify(doc.pendingData));\r\n\r\nif reconnect\r\n  stillPending = JSON.parse(localStorage.getItem(\"DConv:partB\");\r\n  localStorage.removeItem(\"DConv:partB\");\r\n  doc.pendingData.push_each(stillPending);\r\n```"}}