{"action":"created","issue":{"url":"https://api.github.com/repos/diaspora/diaspora/issues/6818","repository_url":"https://api.github.com/repos/diaspora/diaspora","labels_url":"https://api.github.com/repos/diaspora/diaspora/issues/6818/labels{/name}","comments_url":"https://api.github.com/repos/diaspora/diaspora/issues/6818/comments","events_url":"https://api.github.com/repos/diaspora/diaspora/issues/6818/events","html_url":"https://github.com/diaspora/diaspora/pull/6818","id":151945842,"number":6818,"title":"Mentions in comments backend changes","user":{"login":"cmrd-senya","id":10187586,"avatar_url":"https://avatars.githubusercontent.com/u/10187586?v=3","gravatar_id":"","url":"https://api.github.com/users/cmrd-senya","html_url":"https://github.com/cmrd-senya","followers_url":"https://api.github.com/users/cmrd-senya/followers","following_url":"https://api.github.com/users/cmrd-senya/following{/other_user}","gists_url":"https://api.github.com/users/cmrd-senya/gists{/gist_id}","starred_url":"https://api.github.com/users/cmrd-senya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmrd-senya/subscriptions","organizations_url":"https://api.github.com/users/cmrd-senya/orgs","repos_url":"https://api.github.com/users/cmrd-senya/repos","events_url":"https://api.github.com/users/cmrd-senya/events{/privacy}","received_events_url":"https://api.github.com/users/cmrd-senya/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/diaspora/diaspora/milestones/23","html_url":"https://github.com/diaspora/diaspora/milestones/0.7.0.0","labels_url":"https://api.github.com/repos/diaspora/diaspora/milestones/23/labels","id":1580816,"number":23,"title":"0.7.0.0","description":"","creator":{"login":"denschub","id":344777,"avatar_url":"https://avatars.githubusercontent.com/u/344777?v=3","gravatar_id":"","url":"https://api.github.com/users/denschub","html_url":"https://github.com/denschub","followers_url":"https://api.github.com/users/denschub/followers","following_url":"https://api.github.com/users/denschub/following{/other_user}","gists_url":"https://api.github.com/users/denschub/gists{/gist_id}","starred_url":"https://api.github.com/users/denschub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denschub/subscriptions","organizations_url":"https://api.github.com/users/denschub/orgs","repos_url":"https://api.github.com/users/denschub/repos","events_url":"https://api.github.com/users/denschub/events{/privacy}","received_events_url":"https://api.github.com/users/denschub/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":0,"state":"open","created_at":"2016-02-13T03:23:01Z","updated_at":"2016-08-08T20:59:43Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2016-04-29T19:00:47Z","updated_at":"2016-11-24T13:50:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/diaspora/diaspora/pulls/6818","html_url":"https://github.com/diaspora/diaspora/pull/6818","diff_url":"https://github.com/diaspora/diaspora/pull/6818.diff","patch_url":"https://github.com/diaspora/diaspora/pull/6818.patch"},"body":"This is an early preliminary PR with backend-changes to support mentions in comments (#1851).\r\n\r\nIt introduces changes to the DB schema making Mention model polymorphic and allowing a mention to belong to a comment. It also creates module Diaspora::MentionsContainer which incapsulates the logic of an object that supports keeping mentions. Now it includes logic I picked from the StatusMessage model.\r\n\r\nATM the mentions in comments are supported to the extent of placing user profile links instead of mention code in the mobile version (it is so because the mobile version doesn't require javascript code changes).\r\n\r\nChanges summary:\r\n- Make Mention model polymorphic;\r\n- Introduce Diaspora::MentionsContainer which incapsulates the logic of an object that supports keeping mentions;\r\n- We don't filter mentions anymore, instead we send notification/show in streams only that mentions, which are visible to the recipient;\r\n- Create Notifications::Mentioned module which incapsulates common logic of mentioned notification;\r\n- Add Notifications::MentionedInComment and move old Notifications::Mentioned to Notifications::MentionedInPost;\r\n- Update the UI code to render new type of notification;\r\n- Hack comments notifications to avoid having double notification when mentioned in a comment;\r\n\r\nDrive-by refactorings:\r\n- Move Notification.types out of the model to the controller;\r\n- Move `StatusMessage#mentioned_people_names` out of the model. Create a `PersonPresenter.people_names` method instead;\r\n- DRY UserController to use UserPreference::VALID_EMAIL_TYPES in the `user_params` method;\r\n\r\nTODO:\r\n- [x] Implement notifications for mentioning in comments\r\n- [x] Implement restrictions of mentioning some kind of people (see [comment](https://github.com/diaspora/diaspora/issues/1851#issuecomment-36557842))\r\n- [x] Ensure comment is federated to new discussion participants\r\n- [x] Ensure mentions in comment are filtered on federation receive\r\n- [x] ~~Ensure the filtered out mentions are replaced with links properly~~\r\n- [x] Don't send redundant second notification when mentioned in comment.\r\n- [x] Ensure email notifications work properly\r\n- ~~Implement frontend javascript changes for comments publisher~~\r\n"},"comment":{"url":"https://api.github.com/repos/diaspora/diaspora/issues/comments/262780428","html_url":"https://github.com/diaspora/diaspora/pull/6818#issuecomment-262780428","issue_url":"https://api.github.com/repos/diaspora/diaspora/issues/6818","id":262780428,"user":{"login":"cmrd-senya","id":10187586,"avatar_url":"https://avatars.githubusercontent.com/u/10187586?v=3","gravatar_id":"","url":"https://api.github.com/users/cmrd-senya","html_url":"https://github.com/cmrd-senya","followers_url":"https://api.github.com/users/cmrd-senya/followers","following_url":"https://api.github.com/users/cmrd-senya/following{/other_user}","gists_url":"https://api.github.com/users/cmrd-senya/gists{/gist_id}","starred_url":"https://api.github.com/users/cmrd-senya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmrd-senya/subscriptions","organizations_url":"https://api.github.com/users/cmrd-senya/orgs","repos_url":"https://api.github.com/users/cmrd-senya/repos","events_url":"https://api.github.com/users/cmrd-senya/events{/privacy}","received_events_url":"https://api.github.com/users/cmrd-senya/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T13:50:25Z","updated_at":"2016-11-24T13:50:25Z","body":"> Does this PR have a path to query the users that can be mentionned?\r\n\r\nNo, there isn't since I haven't ever started the UI part.\r\n\r\n> I'm not sure our users will use it with the @{name;handle} syntax.\r\n\r\nThe syntax is `@{name; handle}`, the space after `;` is important (that is a hardcoded regexp we have there). And I don't think it is necessary that every user of your pod will test this feature. It is fine to test it among a little group of people, even only ourselves. Again, testing it on \"usual users\" massively is not how I think we should do. It's better if manual testing is conducted by a person who have some technical skills and understanding of technologies. Most probably, that if a user fails to use mention markdown syntax correctly, then he would also fail to give a decent feedback. Then, if we rush with UI, it could make things more complicated, because you'll have to introduce even more changes, some of them to controllers. If there are any issues with the quickly made UI, it'll get harder to find what is broken.\r\n\r\nIt's enough even if one person (except of me) conducts testing if it is done well. If it is fine to test changes on the end-users right away, then why don't we just merge the PR to the develop branch right away without any more manual tests?"}}
{"actor":{"display_login":"cmrd-senya"}}