{"action":"created","issue":{"url":"https://api.github.com/repos/zerobias/telegram-mtproto/issues/61","repository_url":"https://api.github.com/repos/zerobias/telegram-mtproto","labels_url":"https://api.github.com/repos/zerobias/telegram-mtproto/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/zerobias/telegram-mtproto/issues/61/comments","events_url":"https://api.github.com/repos/zerobias/telegram-mtproto/issues/61/events","html_url":"https://github.com/zerobias/telegram-mtproto/issues/61","id":236484215,"number":61,"title":"example of session storage","user":{"login":"elyas74","id":7443168,"avatar_url":"https://avatars1.githubusercontent.com/u/7443168?v=4","gravatar_id":"","url":"https://api.github.com/users/elyas74","html_url":"https://github.com/elyas74","followers_url":"https://api.github.com/users/elyas74/followers","following_url":"https://api.github.com/users/elyas74/following{/other_user}","gists_url":"https://api.github.com/users/elyas74/gists{/gist_id}","starred_url":"https://api.github.com/users/elyas74/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyas74/subscriptions","organizations_url":"https://api.github.com/users/elyas74/orgs","repos_url":"https://api.github.com/users/elyas74/repos","events_url":"https://api.github.com/users/elyas74/events{/privacy}","received_events_url":"https://api.github.com/users/elyas74/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-06-16T13:32:59Z","updated_at":"2017-08-09T13:47:08Z","closed_at":null,"body":"Is there any example for saving sessions or something like this?"},"comment":{"url":"https://api.github.com/repos/zerobias/telegram-mtproto/issues/comments/321260179","html_url":"https://github.com/zerobias/telegram-mtproto/issues/61#issuecomment-321260179","issue_url":"https://api.github.com/repos/zerobias/telegram-mtproto/issues/61","id":321260179,"user":{"login":"FragsterAt","id":20900647,"avatar_url":"https://avatars1.githubusercontent.com/u/20900647?v=4","gravatar_id":"","url":"https://api.github.com/users/FragsterAt","html_url":"https://github.com/FragsterAt","followers_url":"https://api.github.com/users/FragsterAt/followers","following_url":"https://api.github.com/users/FragsterAt/following{/other_user}","gists_url":"https://api.github.com/users/FragsterAt/gists{/gist_id}","starred_url":"https://api.github.com/users/FragsterAt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FragsterAt/subscriptions","organizations_url":"https://api.github.com/users/FragsterAt/orgs","repos_url":"https://api.github.com/users/FragsterAt/repos","events_url":"https://api.github.com/users/FragsterAt/events{/privacy}","received_events_url":"https://api.github.com/users/FragsterAt/received_events","type":"User","site_admin":false},"created_at":"2017-08-09T13:47:08Z","updated_at":"2017-08-09T13:47:08Z","body":"when i try to use saved sessions, i get \r\n`{ Error: AUTH_RESTART`\r\nerror in console.\r\nalso, i use my own [simple store](https://gist.github.com/FragsterAt/941ffda347b42ae3d689ac1e3a0c9486), it will use database as storage finally, now it is \"in memory storage\": \r\n\r\nlet session = JSON.parse('{...here data from prev run :)...}');\r\nstorage.loadData(session);\r\nconst telegram = MTProto({app: {storage}});\r\ntelegram('contacts.getContacts', {\r\n      hash: '' // where I can get it?\r\n    });\r\n  }).then(contacts => {\r\n    console.log('contacts', contacts);\r\n    console.log(JSON.stringify(telegram.storage.saveData()));\r\n    process.exit();"}}
{"actor":{"display_login":"FragsterAt"}}