{"action":"created","issue":{"url":"https://api.github.com/repos/thelounge/lounge/issues/663","repository_url":"https://api.github.com/repos/thelounge/lounge","labels_url":"https://api.github.com/repos/thelounge/lounge/issues/663/labels{/name}","comments_url":"https://api.github.com/repos/thelounge/lounge/issues/663/comments","events_url":"https://api.github.com/repos/thelounge/lounge/issues/663/events","html_url":"https://github.com/thelounge/lounge/pull/663","id":180497965,"number":663,"title":"[WIP] Load previous messages from the logs","user":{"login":"astorije","id":113730,"avatar_url":"https://avatars.githubusercontent.com/u/113730?v=3","gravatar_id":"","url":"https://api.github.com/users/astorije","html_url":"https://github.com/astorije","followers_url":"https://api.github.com/users/astorije/followers","following_url":"https://api.github.com/users/astorije/following{/other_user}","gists_url":"https://api.github.com/users/astorije/gists{/gist_id}","starred_url":"https://api.github.com/users/astorije/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorije/subscriptions","organizations_url":"https://api.github.com/users/astorije/orgs","repos_url":"https://api.github.com/users/astorije/repos","events_url":"https://api.github.com/users/astorije/events{/privacy}","received_events_url":"https://api.github.com/users/astorije/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/thelounge/lounge/labels/do%20not%20merge","name":"do not merge","color":"ff0000"},{"url":"https://api.github.com/repos/thelounge/lounge/labels/enhancement","name":"enhancement","color":"2196F3"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-02T06:19:51Z","updated_at":"2016-10-02T13:31:53Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thelounge/lounge/pulls/663","html_url":"https://github.com/thelounge/lounge/pull/663","diff_url":"https://github.com/thelounge/lounge/pull/663.diff","patch_url":"https://github.com/thelounge/lounge/pull/663.patch"},"body":"This is highly WIP. I'm not sure how successful it will be, but it's sad we have (almost) everything in the logs and we can't read from them when we restart the app (I know, I know, <insert here your favorite discussion about database>, but this is really just an attempt to read from what we have at minimal cost.\r\n\r\n### TODO\r\n\r\nI'm sure there are many TODOs before I could call this remotely reviewable, so I'll be listing them here to keep track of stuff.\r\n\r\n- [x] Load previous messages at startup\r\n- [ ] Load previous messages at join\r\n- [ ] Load previous messages when starting a private discussion\r\n- [ ] Display all types of messages\r\n  - [x] Messages\r\n  - [x] Actions\r\n  - [ ] Everything else...\r\n- [ ] Use the history limit to not load everything from files\r\n- [ ] Display actual timestamp instead of time when logs were read"},"comment":{"url":"https://api.github.com/repos/thelounge/lounge/issues/comments/250971416","html_url":"https://github.com/thelounge/lounge/pull/663#issuecomment-250971416","issue_url":"https://api.github.com/repos/thelounge/lounge/issues/663","id":250971416,"user":{"login":"astorije","id":113730,"avatar_url":"https://avatars.githubusercontent.com/u/113730?v=3","gravatar_id":"","url":"https://api.github.com/users/astorije","html_url":"https://github.com/astorije","followers_url":"https://api.github.com/users/astorije/followers","following_url":"https://api.github.com/users/astorije/following{/other_user}","gists_url":"https://api.github.com/users/astorije/gists{/gist_id}","starred_url":"https://api.github.com/users/astorije/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astorije/subscriptions","organizations_url":"https://api.github.com/users/astorije/orgs","repos_url":"https://api.github.com/users/astorije/repos","events_url":"https://api.github.com/users/astorije/events{/privacy}","received_events_url":"https://api.github.com/users/astorije/received_events","type":"User","site_admin":false},"created_at":"2016-10-02T13:31:53Z","updated_at":"2016-10-02T13:31:53Z","body":"> All these can be fixed by doing log reading in Chan\r\n\r\nYeah, but I had no access to thing like username in there, so I put it where it is right now for convenience. Most likely not a definitive solution.\r\nAlso, putting it in the constructor means backlog loading is done all the time by default, which may not be what we want? I'm thinking if we need to instantiate an empty Chan, or in tests, etc. I don't know, I'm still playing with this :)"}}
{"actor":{"display_login":"astorije"}}