{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/mail/pulls/comments/66718425","id":66718425,"diff_hunk":"@@ -0,0 +1,101 @@\n+<?php\n+/**\n+ * @author Tahaa Karim <tahaalibra@gmail.com>\n+ *\n+ * ownCloud - Mail\n+ *\n+ * This code is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU Affero General Public License, version 3,\n+ * as published by the Free Software Foundation.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+ * GNU Affero General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Affero General Public License, version 3,\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>\n+ *\n+ */\n+\n+namespace OCA\\Mail\\Controller;\n+\n+use OCA\\Mail\\Db\\Alias;\n+use OCP\\IRequest;\n+use OCA\\Mail\\Service\\AliasesService;\n+use OCP\\AppFramework\\Controller;\n+use OCP\\AppFramework\\Http\\JSONResponse;\n+use OCP\\AppFramework\\Http;\n+\n+class AliasesController extends Controller {\n+\n+\t/** @var AliasesService */\n+\tprivate $aliasService;\n+\n+\t/**\n+\t * @var string\n+\t */\n+\tprivate $currentUserId;\n+\n+\t/**\n+\t * @param string $appName\n+\t * @param IRequest $request\n+\t * @param AliasesService $aliasesService\n+\t */\n+\tpublic function __construct($appName, IRequest $request, AliasesService $aliasesService) {\n+\t\tparent::__construct($appName, $request);\n+\t\t$this->aliasService = $aliasesService;\n+\t}\n+\n+\t/**\n+\t * @NoAdminRequired\n+\t * @NoCSRFRequired\n+\t * @param int $accountId\n+\t * @return Alias[]\n+\t */\n+\tpublic function index($accountId) {\n+\t\treturn $this->aliasService->findAll($accountId);\n+\t}\n+\n+\t/**\n+\t * @NoAdminRequired\n+\t * @NoCSRFRequired\n+\t */\n+\tpublic function show() {\n+\t\t$response = new JSONResponse();\n+\t\t$response->setStatus(Http::STATUS_NOT_IMPLEMENTED);\n+\t\treturn $response;\n+\t}\n+\n+\t/**\n+\t * @NoAdminRequired\n+\t * @NoCSRFRequired\n+\t * @param int $id\n+\t * @param string $alias\n+\t * @return Alias[]\n+\t */\n+\tpublic function update($id, $alias) {\n+\t\treturn $this->aliasService->update($id, $alias);\n+\t}\n+\n+\t/**\n+\t * @NoAdminRequired\n+\t * @NoCSRFRequired\n+\t * @param int $id\n+\t * @return Alias[]\n+\t */\n+\tpublic function destroy($id) {\n+\t\treturn $this->aliasService->delete($id);\n+\t}\n+\n+\t/**\n+\t * @NoAdminRequired\n+\t * @NoCSRFRequired\n+\t * @param int $accountId\n+\t * @param string $alias\n+\t * @return Alias[]\n+\t */\n+\tpublic function create($accountId, $alias) {\n+\t\treturn $this->aliasService->create($accountId, $alias);","path":"lib/controller/aliasescontroller.php","position":99,"original_position":99,"commit_id":"90df90d4c8bb5927cc9e01ee3a3e61f1fb059832","original_commit_id":"90df90d4c8bb5927cc9e01ee3a3e61f1fb059832","user":{"login":"ChristophWurst","id":1374172,"avatar_url":"https://avatars.githubusercontent.com/u/1374172?v=3","gravatar_id":"","url":"https://api.github.com/users/ChristophWurst","html_url":"https://github.com/ChristophWurst","followers_url":"https://api.github.com/users/ChristophWurst/followers","following_url":"https://api.github.com/users/ChristophWurst/following{/other_user}","gists_url":"https://api.github.com/users/ChristophWurst/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristophWurst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristophWurst/subscriptions","organizations_url":"https://api.github.com/users/ChristophWurst/orgs","repos_url":"https://api.github.com/users/ChristophWurst/repos","events_url":"https://api.github.com/users/ChristophWurst/events{/privacy}","received_events_url":"https://api.github.com/users/ChristophWurst/received_events","type":"User","site_admin":false},"body":"- [ ] TODO: pass user object","created_at":"2016-06-12T09:20:08Z","updated_at":"2016-06-12T09:20:08Z","html_url":"https://github.com/owncloud/mail/pull/1523#discussion_r66718425","pull_request_url":"https://api.github.com/repos/owncloud/mail/pulls/1523","_links":{"self":{"href":"https://api.github.com/repos/owncloud/mail/pulls/comments/66718425"},"html":{"href":"https://github.com/owncloud/mail/pull/1523#discussion_r66718425"},"pull_request":{"href":"https://api.github.com/repos/owncloud/mail/pulls/1523"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/mail/pulls/1523","id":73032107,"html_url":"https://github.com/owncloud/mail/pull/1523","diff_url":"https://github.com/owncloud/mail/pull/1523.diff","patch_url":"https://github.com/owncloud/mail/pull/1523.patch","issue_url":"https://api.github.com/repos/owncloud/mail/issues/1523","number":1523,"state":"open","locked":false,"title":"add aliases feature","user":{"login":"tahaalibra","id":6804341,"avatar_url":"https://avatars.githubusercontent.com/u/6804341?v=3","gravatar_id":"","url":"https://api.github.com/users/tahaalibra","html_url":"https://github.com/tahaalibra","followers_url":"https://api.github.com/users/tahaalibra/followers","following_url":"https://api.github.com/users/tahaalibra/following{/other_user}","gists_url":"https://api.github.com/users/tahaalibra/gists{/gist_id}","starred_url":"https://api.github.com/users/tahaalibra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tahaalibra/subscriptions","organizations_url":"https://api.github.com/users/tahaalibra/orgs","repos_url":"https://api.github.com/users/tahaalibra/repos","events_url":"https://api.github.com/users/tahaalibra/events{/privacy}","received_events_url":"https://api.github.com/users/tahaalibra/received_events","type":"User","site_admin":false},"body":"this will solve #122 \r\nthis will allow sending email from aliases \r\n\r\nNote: \r\nmuch of it is incomplete\r\n\r\n@ChristophWurst @Gomez ","created_at":"2016-06-08T11:47:09Z","updated_at":"2016-06-12T09:20:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92bc4fbbd84cc165496113319f4adbf361f73a0a","assignee":{"login":"tahaalibra","id":6804341,"avatar_url":"https://avatars.githubusercontent.com/u/6804341?v=3","gravatar_id":"","url":"https://api.github.com/users/tahaalibra","html_url":"https://github.com/tahaalibra","followers_url":"https://api.github.com/users/tahaalibra/followers","following_url":"https://api.github.com/users/tahaalibra/following{/other_user}","gists_url":"https://api.github.com/users/tahaalibra/gists{/gist_id}","starred_url":"https://api.github.com/users/tahaalibra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tahaalibra/subscriptions","organizations_url":"https://api.github.com/users/tahaalibra/orgs","repos_url":"https://api.github.com/users/tahaalibra/repos","events_url":"https://api.github.com/users/tahaalibra/events{/privacy}","received_events_url":"https://api.github.com/users/tahaalibra/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/owncloud/mail/pulls/1523/commits","review_comments_url":"https://api.github.com/repos/owncloud/mail/pulls/1523/comments","review_comment_url":"https://api.github.com/repos/owncloud/mail/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/mail/issues/1523/comments","statuses_url":"https://api.github.com/repos/owncloud/mail/statuses/90df90d4c8bb5927cc9e01ee3a3e61f1fb059832","head":{"label":"owncloud:aliases","ref":"aliases","sha":"90df90d4c8bb5927cc9e01ee3a3e61f1fb059832","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":8604367,"name":"mail","full_name":"owncloud/mail","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/mail","description":" :love_letter: Mail app for ownCloud","fork":false,"url":"https://api.github.com/repos/owncloud/mail","forks_url":"https://api.github.com/repos/owncloud/mail/forks","keys_url":"https://api.github.com/repos/owncloud/mail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/mail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/mail/teams","hooks_url":"https://api.github.com/repos/owncloud/mail/hooks","issue_events_url":"https://api.github.com/repos/owncloud/mail/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/mail/events","assignees_url":"https://api.github.com/repos/owncloud/mail/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/mail/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/mail/tags","blobs_url":"https://api.github.com/repos/owncloud/mail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/mail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/mail/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/mail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/mail/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/mail/languages","stargazers_url":"https://api.github.com/repos/owncloud/mail/stargazers","contributors_url":"https://api.github.com/repos/owncloud/mail/contributors","subscribers_url":"https://api.github.com/repos/owncloud/mail/subscribers","subscription_url":"https://api.github.com/repos/owncloud/mail/subscription","commits_url":"https://api.github.com/repos/owncloud/mail/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/mail/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/mail/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/mail/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/mail/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/mail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/mail/merges","archive_url":"https://api.github.com/repos/owncloud/mail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/mail/downloads","issues_url":"https://api.github.com/repos/owncloud/mail/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/mail/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/mail/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/mail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/mail/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/mail/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/mail/deployments","created_at":"2013-03-06T13:51:00Z","updated_at":"2016-06-11T18:51:16Z","pushed_at":"2016-06-12T09:19:25Z","git_url":"git://github.com/owncloud/mail.git","ssh_url":"git@github.com:owncloud/mail.git","clone_url":"https://github.com/owncloud/mail.git","svn_url":"https://github.com/owncloud/mail","homepage":"https://apps.owncloud.com/content/show.php/Mail?content=169914","size":12289,"stargazers_count":267,"watchers_count":267,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":208,"forks":91,"open_issues":208,"watchers":267,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"b1291647588e4c1f8ac378fa7c37611b0b3f5cae","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":8604367,"name":"mail","full_name":"owncloud/mail","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/mail","description":" :love_letter: Mail app for ownCloud","fork":false,"url":"https://api.github.com/repos/owncloud/mail","forks_url":"https://api.github.com/repos/owncloud/mail/forks","keys_url":"https://api.github.com/repos/owncloud/mail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/mail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/mail/teams","hooks_url":"https://api.github.com/repos/owncloud/mail/hooks","issue_events_url":"https://api.github.com/repos/owncloud/mail/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/mail/events","assignees_url":"https://api.github.com/repos/owncloud/mail/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/mail/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/mail/tags","blobs_url":"https://api.github.com/repos/owncloud/mail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/mail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/mail/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/mail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/mail/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/mail/languages","stargazers_url":"https://api.github.com/repos/owncloud/mail/stargazers","contributors_url":"https://api.github.com/repos/owncloud/mail/contributors","subscribers_url":"https://api.github.com/repos/owncloud/mail/subscribers","subscription_url":"https://api.github.com/repos/owncloud/mail/subscription","commits_url":"https://api.github.com/repos/owncloud/mail/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/mail/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/mail/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/mail/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/mail/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/mail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/mail/merges","archive_url":"https://api.github.com/repos/owncloud/mail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/mail/downloads","issues_url":"https://api.github.com/repos/owncloud/mail/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/mail/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/mail/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/mail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/mail/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/mail/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/mail/deployments","created_at":"2013-03-06T13:51:00Z","updated_at":"2016-06-11T18:51:16Z","pushed_at":"2016-06-12T09:19:25Z","git_url":"git://github.com/owncloud/mail.git","ssh_url":"git@github.com:owncloud/mail.git","clone_url":"https://github.com/owncloud/mail.git","svn_url":"https://github.com/owncloud/mail","homepage":"https://apps.owncloud.com/content/show.php/Mail?content=169914","size":12289,"stargazers_count":267,"watchers_count":267,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":91,"mirror_url":null,"open_issues_count":208,"forks":91,"open_issues":208,"watchers":267,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/mail/pulls/1523"},"html":{"href":"https://github.com/owncloud/mail/pull/1523"},"issue":{"href":"https://api.github.com/repos/owncloud/mail/issues/1523"},"comments":{"href":"https://api.github.com/repos/owncloud/mail/issues/1523/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/mail/pulls/1523/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/mail/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/mail/pulls/1523/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/mail/statuses/90df90d4c8bb5927cc9e01ee3a3e61f1fb059832"}}}}
{"actor":{"display_login":"ChristophWurst"}}