{"action":"created","comment":{"url":"https://api.github.com/repos/cozy/cozy-calendar/pulls/comments/67436450","id":67436450,"diff_hunk":"@@ -158,31 +183,79 @@ module.exports = class GuestPopoverScreen extends EventPopoverScreenView\n     # Handle guest addition. `userInfo` is passed when called by the typeahead.\n     onNewGuest: (userInfo = null) ->\n \n+        # Autocomplete was used.\n         if userInfo? and typeof(userInfo) is \"string\"\n-            [email, contactID] = userInfo.split(';')\n+            [channel, contactID] = userInfo.split(';')\n+        # Field was entered manually.","path":"client/app/views/popover_screens/guests.coffee","position":83,"original_position":83,"commit_id":"3d060b5a2f451fc42010f430570f45bd5c6efee0","original_commit_id":"3d060b5a2f451fc42010f430570f45bd5c6efee0","user":{"login":"gregorylegarec","id":776764,"avatar_url":"https://avatars.githubusercontent.com/u/776764?v=3","gravatar_id":"","url":"https://api.github.com/users/gregorylegarec","html_url":"https://github.com/gregorylegarec","followers_url":"https://api.github.com/users/gregorylegarec/followers","following_url":"https://api.github.com/users/gregorylegarec/following{/other_user}","gists_url":"https://api.github.com/users/gregorylegarec/gists{/gist_id}","starred_url":"https://api.github.com/users/gregorylegarec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregorylegarec/subscriptions","organizations_url":"https://api.github.com/users/gregorylegarec/orgs","repos_url":"https://api.github.com/users/gregorylegarec/repos","events_url":"https://api.github.com/users/gregorylegarec/events{/privacy}","received_events_url":"https://api.github.com/users/gregorylegarec/received_events","type":"User","site_admin":false},"body":"I think relying on a string split for knowing the source of the contact is an anti-pattern, but I looked into the typeahead plugin and it will be really painful do proceed in another way. So let's go with that :)\r\n\r\n(Ideally, we should have an object in parameter for `onNewGuest`. This object should be something like :\r\n'''javascript\r\n{\r\n    contact: fetchedContact\r\n    source: 'cozy'\r\n}\r\n'''\r\nI think we should keep this idea in the backlog, but it's not the right time now.","created_at":"2016-06-16T22:36:54Z","updated_at":"2016-06-16T22:36:54Z","html_url":"https://github.com/cozy/cozy-calendar/pull/551#discussion_r67436450","pull_request_url":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551","_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-calendar/pulls/comments/67436450"},"html":{"href":"https://github.com/cozy/cozy-calendar/pull/551#discussion_r67436450"},"pull_request":{"href":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551"}}},"pull_request":{"url":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551","id":73769018,"html_url":"https://github.com/cozy/cozy-calendar/pull/551","diff_url":"https://github.com/cozy/cozy-calendar/pull/551.diff","patch_url":"https://github.com/cozy/cozy-calendar/pull/551.patch","issue_url":"https://api.github.com/repos/cozy/cozy-calendar/issues/551","number":551,"state":"open","locked":false,"title":"Enhance guest addition for share","user":{"login":"Ljinod","id":6913187,"avatar_url":"https://avatars.githubusercontent.com/u/6913187?v=3","gravatar_id":"","url":"https://api.github.com/users/Ljinod","html_url":"https://github.com/Ljinod","followers_url":"https://api.github.com/users/Ljinod/followers","following_url":"https://api.github.com/users/Ljinod/following{/other_user}","gists_url":"https://api.github.com/users/Ljinod/gists{/gist_id}","starred_url":"https://api.github.com/users/Ljinod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ljinod/subscriptions","organizations_url":"https://api.github.com/users/Ljinod/orgs","repos_url":"https://api.github.com/users/Ljinod/repos","events_url":"https://api.github.com/users/Ljinod/events{/privacy}","received_events_url":"https://api.github.com/users/Ljinod/received_events","type":"User","site_admin":false},"body":"This PR introduces the following changes:\r\n* the search in the guest popover now also proposes Cozy url based on\r\nwhat is present in the contact application;\r\n* the calendar application can now handle a contact for whom several\r\nCozy instances are linked;\r\n* if a guest has a Cozy url and an email in his contact information then\r\nthe user can decide if she wants to share the invitation or send it by\r\nmail. It is possible to switch between those two possibilities thanks to\r\ntwo new buttons. The currently selected option has its button\r\nhighlighted in blue;\r\n* if it is not possible to switch from email to share, or from share to\r\nemail the button corresponding to the unavailable choice is hidden;\r\n* a Cozy url can be typed directly in the search field. If no \"@\" is\r\nfound it is considered as the url of a Cozy. If a \"@\" is found it is\r\ninterpreted as an email address;\r\n* if an email address or a Cozy url is too long to be displayed inside\r\nthe popover then the overflowing text is replaced by three dots and is\r\nonly displayed on two lines when hovering.","created_at":"2016-06-14T16:10:17Z","updated_at":"2016-06-16T22:36:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0d12db0ffdcc8371e071f786d3c5f7ba9b3ba7f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551/commits","review_comments_url":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551/comments","review_comment_url":"https://api.github.com/repos/cozy/cozy-calendar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cozy/cozy-calendar/issues/551/comments","statuses_url":"https://api.github.com/repos/cozy/cozy-calendar/statuses/3d060b5a2f451fc42010f430570f45bd5c6efee0","head":{"label":"Ljinod:PR-enhance-guest-addition","ref":"PR-enhance-guest-addition","sha":"3d060b5a2f451fc42010f430570f45bd5c6efee0","user":{"login":"Ljinod","id":6913187,"avatar_url":"https://avatars.githubusercontent.com/u/6913187?v=3","gravatar_id":"","url":"https://api.github.com/users/Ljinod","html_url":"https://github.com/Ljinod","followers_url":"https://api.github.com/users/Ljinod/followers","following_url":"https://api.github.com/users/Ljinod/following{/other_user}","gists_url":"https://api.github.com/users/Ljinod/gists{/gist_id}","starred_url":"https://api.github.com/users/Ljinod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ljinod/subscriptions","organizations_url":"https://api.github.com/users/Ljinod/orgs","repos_url":"https://api.github.com/users/Ljinod/repos","events_url":"https://api.github.com/users/Ljinod/events{/privacy}","received_events_url":"https://api.github.com/users/Ljinod/received_events","type":"User","site_admin":false},"repo":{"id":48995871,"name":"cozy-calendar","full_name":"Ljinod/cozy-calendar","owner":{"login":"Ljinod","id":6913187,"avatar_url":"https://avatars.githubusercontent.com/u/6913187?v=3","gravatar_id":"","url":"https://api.github.com/users/Ljinod","html_url":"https://github.com/Ljinod","followers_url":"https://api.github.com/users/Ljinod/followers","following_url":"https://api.github.com/users/Ljinod/following{/other_user}","gists_url":"https://api.github.com/users/Ljinod/gists{/gist_id}","starred_url":"https://api.github.com/users/Ljinod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ljinod/subscriptions","organizations_url":"https://api.github.com/users/Ljinod/orgs","repos_url":"https://api.github.com/users/Ljinod/repos","events_url":"https://api.github.com/users/Ljinod/events{/privacy}","received_events_url":"https://api.github.com/users/Ljinod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ljinod/cozy-calendar","description":"An application to manage your events","fork":true,"url":"https://api.github.com/repos/Ljinod/cozy-calendar","forks_url":"https://api.github.com/repos/Ljinod/cozy-calendar/forks","keys_url":"https://api.github.com/repos/Ljinod/cozy-calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ljinod/cozy-calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ljinod/cozy-calendar/teams","hooks_url":"https://api.github.com/repos/Ljinod/cozy-calendar/hooks","issue_events_url":"https://api.github.com/repos/Ljinod/cozy-calendar/issues/events{/number}","events_url":"https://api.github.com/repos/Ljinod/cozy-calendar/events","assignees_url":"https://api.github.com/repos/Ljinod/cozy-calendar/assignees{/user}","branches_url":"https://api.github.com/repos/Ljinod/cozy-calendar/branches{/branch}","tags_url":"https://api.github.com/repos/Ljinod/cozy-calendar/tags","blobs_url":"https://api.github.com/repos/Ljinod/cozy-calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ljinod/cozy-calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ljinod/cozy-calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ljinod/cozy-calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ljinod/cozy-calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/Ljinod/cozy-calendar/languages","stargazers_url":"https://api.github.com/repos/Ljinod/cozy-calendar/stargazers","contributors_url":"https://api.github.com/repos/Ljinod/cozy-calendar/contributors","subscribers_url":"https://api.github.com/repos/Ljinod/cozy-calendar/subscribers","subscription_url":"https://api.github.com/repos/Ljinod/cozy-calendar/subscription","commits_url":"https://api.github.com/repos/Ljinod/cozy-calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ljinod/cozy-calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ljinod/cozy-calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ljinod/cozy-calendar/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ljinod/cozy-calendar/contents/{+path}","compare_url":"https://api.github.com/repos/Ljinod/cozy-calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ljinod/cozy-calendar/merges","archive_url":"https://api.github.com/repos/Ljinod/cozy-calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ljinod/cozy-calendar/downloads","issues_url":"https://api.github.com/repos/Ljinod/cozy-calendar/issues{/number}","pulls_url":"https://api.github.com/repos/Ljinod/cozy-calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/Ljinod/cozy-calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/Ljinod/cozy-calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ljinod/cozy-calendar/labels{/name}","releases_url":"https://api.github.com/repos/Ljinod/cozy-calendar/releases{/id}","deployments_url":"https://api.github.com/repos/Ljinod/cozy-calendar/deployments","created_at":"2016-01-04T12:32:14Z","updated_at":"2016-06-13T14:13:55Z","pushed_at":"2016-06-16T11:55:41Z","git_url":"git://github.com/Ljinod/cozy-calendar.git","ssh_url":"git@github.com:Ljinod/cozy-calendar.git","clone_url":"https://github.com/Ljinod/cozy-calendar.git","svn_url":"https://github.com/Ljinod/cozy-calendar","homepage":"https://demo.cozycloud.cc/#apps/calendar/","size":15561,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cozy:development","ref":"development","sha":"2fd9e78255fe9ddd5651615cd90bc504d8e561c7","user":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"repo":{"id":9580885,"name":"cozy-calendar","full_name":"cozy/cozy-calendar","owner":{"login":"cozy","id":7690525,"avatar_url":"https://avatars.githubusercontent.com/u/7690525?v=3","gravatar_id":"","url":"https://api.github.com/users/cozy","html_url":"https://github.com/cozy","followers_url":"https://api.github.com/users/cozy/followers","following_url":"https://api.github.com/users/cozy/following{/other_user}","gists_url":"https://api.github.com/users/cozy/gists{/gist_id}","starred_url":"https://api.github.com/users/cozy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cozy/subscriptions","organizations_url":"https://api.github.com/users/cozy/orgs","repos_url":"https://api.github.com/users/cozy/repos","events_url":"https://api.github.com/users/cozy/events{/privacy}","received_events_url":"https://api.github.com/users/cozy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cozy/cozy-calendar","description":"An application to manage your events","fork":false,"url":"https://api.github.com/repos/cozy/cozy-calendar","forks_url":"https://api.github.com/repos/cozy/cozy-calendar/forks","keys_url":"https://api.github.com/repos/cozy/cozy-calendar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cozy/cozy-calendar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cozy/cozy-calendar/teams","hooks_url":"https://api.github.com/repos/cozy/cozy-calendar/hooks","issue_events_url":"https://api.github.com/repos/cozy/cozy-calendar/issues/events{/number}","events_url":"https://api.github.com/repos/cozy/cozy-calendar/events","assignees_url":"https://api.github.com/repos/cozy/cozy-calendar/assignees{/user}","branches_url":"https://api.github.com/repos/cozy/cozy-calendar/branches{/branch}","tags_url":"https://api.github.com/repos/cozy/cozy-calendar/tags","blobs_url":"https://api.github.com/repos/cozy/cozy-calendar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cozy/cozy-calendar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cozy/cozy-calendar/git/refs{/sha}","trees_url":"https://api.github.com/repos/cozy/cozy-calendar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cozy/cozy-calendar/statuses/{sha}","languages_url":"https://api.github.com/repos/cozy/cozy-calendar/languages","stargazers_url":"https://api.github.com/repos/cozy/cozy-calendar/stargazers","contributors_url":"https://api.github.com/repos/cozy/cozy-calendar/contributors","subscribers_url":"https://api.github.com/repos/cozy/cozy-calendar/subscribers","subscription_url":"https://api.github.com/repos/cozy/cozy-calendar/subscription","commits_url":"https://api.github.com/repos/cozy/cozy-calendar/commits{/sha}","git_commits_url":"https://api.github.com/repos/cozy/cozy-calendar/git/commits{/sha}","comments_url":"https://api.github.com/repos/cozy/cozy-calendar/comments{/number}","issue_comment_url":"https://api.github.com/repos/cozy/cozy-calendar/issues/comments{/number}","contents_url":"https://api.github.com/repos/cozy/cozy-calendar/contents/{+path}","compare_url":"https://api.github.com/repos/cozy/cozy-calendar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cozy/cozy-calendar/merges","archive_url":"https://api.github.com/repos/cozy/cozy-calendar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cozy/cozy-calendar/downloads","issues_url":"https://api.github.com/repos/cozy/cozy-calendar/issues{/number}","pulls_url":"https://api.github.com/repos/cozy/cozy-calendar/pulls{/number}","milestones_url":"https://api.github.com/repos/cozy/cozy-calendar/milestones{/number}","notifications_url":"https://api.github.com/repos/cozy/cozy-calendar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cozy/cozy-calendar/labels{/name}","releases_url":"https://api.github.com/repos/cozy/cozy-calendar/releases{/id}","deployments_url":"https://api.github.com/repos/cozy/cozy-calendar/deployments","created_at":"2013-04-21T14:53:41Z","updated_at":"2016-05-02T18:23:08Z","pushed_at":"2016-06-16T16:58:42Z","git_url":"git://github.com/cozy/cozy-calendar.git","ssh_url":"git@github.com:cozy/cozy-calendar.git","clone_url":"https://github.com/cozy/cozy-calendar.git","svn_url":"https://github.com/cozy/cozy-calendar","homepage":"https://demo.cozycloud.cc/#apps/calendar/","size":18047,"stargazers_count":50,"watchers_count":50,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":76,"forks":34,"open_issues":76,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551"},"html":{"href":"https://github.com/cozy/cozy-calendar/pull/551"},"issue":{"href":"https://api.github.com/repos/cozy/cozy-calendar/issues/551"},"comments":{"href":"https://api.github.com/repos/cozy/cozy-calendar/issues/551/comments"},"review_comments":{"href":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551/comments"},"review_comment":{"href":"https://api.github.com/repos/cozy/cozy-calendar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cozy/cozy-calendar/pulls/551/commits"},"statuses":{"href":"https://api.github.com/repos/cozy/cozy-calendar/statuses/3d060b5a2f451fc42010f430570f45bd5c6efee0"}}}}
{"actor":{"display_login":"gregorylegarec"}}