{"action":"created","issue":{"url":"https://api.github.com/repos/thredded/thredded/issues/284","repository_url":"https://api.github.com/repos/thredded/thredded","labels_url":"https://api.github.com/repos/thredded/thredded/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/thredded/thredded/issues/284/comments","events_url":"https://api.github.com/repos/thredded/thredded/issues/284/events","html_url":"https://github.com/thredded/thredded/issues/284","id":153342974,"number":284,"title":"Thinking about @mention notification and highlighting","user":{"login":"timdiggins","id":18395,"avatar_url":"https://avatars.githubusercontent.com/u/18395?v=3","gravatar_id":"","url":"https://api.github.com/users/timdiggins","html_url":"https://github.com/timdiggins","followers_url":"https://api.github.com/users/timdiggins/followers","following_url":"https://api.github.com/users/timdiggins/following{/other_user}","gists_url":"https://api.github.com/users/timdiggins/gists{/gist_id}","starred_url":"https://api.github.com/users/timdiggins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timdiggins/subscriptions","organizations_url":"https://api.github.com/users/timdiggins/orgs","repos_url":"https://api.github.com/users/timdiggins/repos","events_url":"https://api.github.com/users/timdiggins/events{/privacy}","received_events_url":"https://api.github.com/users/timdiggins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-05T22:43:42Z","updated_at":"2016-05-08T15:26:31Z","closed_at":null,"body":"If I have read the codebase correctly it seems like @mention notification is set up to just queue an email when an @ mention is found in a created post.\r\n\r\nHowever I would like to especially highlight unread posts which at mention the viewer. (so the unread posts are highlighted in one way and the mentioning unread posts are highlighted in another).\r\n\r\nAdditionally, it might be that the mechanism of notification is different from a single email -- e.g. post a notification via slack or similar channel.\r\n\r\nIs some kind of abstraction layer  for notification possible/envisage?"},"comment":{"url":"https://api.github.com/repos/thredded/thredded/issues/comments/217726967","html_url":"https://github.com/thredded/thredded/issues/284#issuecomment-217726967","issue_url":"https://api.github.com/repos/thredded/thredded/issues/284","id":217726967,"user":{"login":"jayroh","id":28194,"avatar_url":"https://avatars.githubusercontent.com/u/28194?v=3","gravatar_id":"","url":"https://api.github.com/users/jayroh","html_url":"https://github.com/jayroh","followers_url":"https://api.github.com/users/jayroh/followers","following_url":"https://api.github.com/users/jayroh/following{/other_user}","gists_url":"https://api.github.com/users/jayroh/gists{/gist_id}","starred_url":"https://api.github.com/users/jayroh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jayroh/subscriptions","organizations_url":"https://api.github.com/users/jayroh/orgs","repos_url":"https://api.github.com/users/jayroh/repos","events_url":"https://api.github.com/users/jayroh/events{/privacy}","received_events_url":"https://api.github.com/users/jayroh/received_events","type":"User","site_admin":false},"created_at":"2016-05-08T15:26:31Z","updated_at":"2016-05-08T15:26:31Z","body":"@timdiggins regarding the first part. I think it's doable, sure, but envision that it could/should probably be done asynchronously on the front-end. I think we have several involved queries going on in the current topics#index controller/action that would have to have another layer added atop if we were to bubble up whether or not you (the rhetorical you) were mentioned in that topic.\r\n\r\nOr do you mean in topics#show - where the posts are listed?\r\n\r\n* * *\r\n\r\nAs for the methods by which people are notified - I've started looking into abstracting that out to use [ActiveSupport:Notifications](http://api.rubyonrails.org/classes/ActiveSupport/Notifications.html) to make it easier to subscribe to those types of events and react appropriately. The @ mention and Private Topic notifications would probably end up being refactored to use that mechanism instead of being called from controllers."}}