{"action":"created","issue":{"url":"https://api.github.com/repos/flarum/core/issues/321","labels_url":"https://api.github.com/repos/flarum/core/issues/321/labels{/name}","comments_url":"https://api.github.com/repos/flarum/core/issues/321/comments","events_url":"https://api.github.com/repos/flarum/core/issues/321/events","html_url":"https://github.com/flarum/core/issues/321","id":103833596,"number":321,"title":"[Pusher] Rewrite the whole thing","user":{"login":"tobscure","id":128862,"avatar_url":"https://avatars.githubusercontent.com/u/128862?v=3","gravatar_id":"","url":"https://api.github.com/users/tobscure","html_url":"https://github.com/tobscure","followers_url":"https://api.github.com/users/tobscure/followers","following_url":"https://api.github.com/users/tobscure/following{/other_user}","gists_url":"https://api.github.com/users/tobscure/gists{/gist_id}","starred_url":"https://api.github.com/users/tobscure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobscure/subscriptions","organizations_url":"https://api.github.com/users/tobscure/orgs","repos_url":"https://api.github.com/users/tobscure/repos","events_url":"https://api.github.com/users/tobscure/events{/privacy}","received_events_url":"https://api.github.com/users/tobscure/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/flarum/core/labels/Cleanup","name":"Cleanup","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/flarum/core/milestones/5","html_url":"https://github.com/flarum/core/milestones/0.1.0-beta.6","labels_url":"https://api.github.com/repos/flarum/core/milestones/5/labels","id":1488954,"number":5,"title":"0.1.0-beta.6","description":"","creator":{"login":"tobscure","id":128862,"avatar_url":"https://avatars.githubusercontent.com/u/128862?v=3","gravatar_id":"","url":"https://api.github.com/users/tobscure","html_url":"https://github.com/tobscure","followers_url":"https://api.github.com/users/tobscure/followers","following_url":"https://api.github.com/users/tobscure/following{/other_user}","gists_url":"https://api.github.com/users/tobscure/gists{/gist_id}","starred_url":"https://api.github.com/users/tobscure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobscure/subscriptions","organizations_url":"https://api.github.com/users/tobscure/orgs","repos_url":"https://api.github.com/users/tobscure/repos","events_url":"https://api.github.com/users/tobscure/events{/privacy}","received_events_url":"https://api.github.com/users/tobscure/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":0,"state":"open","created_at":"2016-01-07T07:07:44Z","updated_at":"2016-01-10T20:00:48Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2015-08-29T06:39:42Z","updated_at":"2016-01-18T14:05:22Z","closed_at":null,"body":"_From @tobscure on August 27, 2015 13:51_\r\n\r\nI threw the Pusher extension together in a night without much thought, because I wanted to get the beta out the door :P\r\n\r\nWhile it does the basics OK (update the discussion list, push new posts, and update the unread notifications count), it could be way better. And it's a mess and basically needs to be rewritten. Anyway, here's how I think it should be improved:\r\n\r\n* Extract a lot of the code into core, so that the extension is effectively telling core \"hey I just found out about this new post in this discussion – whatchu gunna do about it?\" and then core shows the \"1 updated discussions\" button or updates the post stream or whatever. This will allow us to write other extensions for different push services without duplicating/having inconsistent implementations.\r\n* Make it push more information about the discussion that was updated, so that we can check whether we already have the most up-to-date information, and don't have to extend `addDiscussion`.\r\n* Don't say there are updated discussions if they are in a hidden tag\r\n* Push to a user whenever they read notifications, so that the number of unread notifications stays in sync between browser windows.\r\n* Push for discussion events (e.g. discussion renaming)\r\n* Push for post likes\r\n* Show a little bubble every time a notification is received (again, this is something that would probably belong in core)\r\n* Push user online status (via presence channels? idk)\r\n\r\nWhat needs to be done:\r\n\r\n* Working out a plan of attack for that first bullet point is the most important thing.\r\n* Reimplement the current basic features in a cleaner way.\r\n* Create issues for the additional features.\r\n\r\n_Copied from original issue: flarum/pusher#1_"},"comment":{"url":"https://api.github.com/repos/flarum/core/issues/comments/172534353","html_url":"https://github.com/flarum/core/issues/321#issuecomment-172534353","issue_url":"https://api.github.com/repos/flarum/core/issues/321","id":172534353,"user":{"login":"Luceos","id":504687,"avatar_url":"https://avatars.githubusercontent.com/u/504687?v=3","gravatar_id":"","url":"https://api.github.com/users/Luceos","html_url":"https://github.com/Luceos","followers_url":"https://api.github.com/users/Luceos/followers","following_url":"https://api.github.com/users/Luceos/following{/other_user}","gists_url":"https://api.github.com/users/Luceos/gists{/gist_id}","starred_url":"https://api.github.com/users/Luceos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Luceos/subscriptions","organizations_url":"https://api.github.com/users/Luceos/orgs","repos_url":"https://api.github.com/users/Luceos/repos","events_url":"https://api.github.com/users/Luceos/events{/privacy}","received_events_url":"https://api.github.com/users/Luceos/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T14:05:22Z","updated_at":"2016-01-18T14:05:22Z","body":"@frostymarvelous yes so the implementation should have an array like `$requiredGroup` which is filled throughout the loop. Not that much of an issue."}}