{"action":"created","comment":{"url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/comments/172505990","pull_request_review_id":101531408,"id":172505990,"diff_hunk":"@@ -47,19 +57,53 @@ public function parse($language, IEvent $event, IEvent $previousEvent = null) {\n \n \t\t$l = $this->languageFactory->get('files_antivirus', $language);\n \n-\t\tswitch ($event->getSubject()) {\n-\t\t\tcase self::SUBJECT_VIRUS_DETECTED:\n-\t\t\t\t$event->setParsedSubject($l->t('File %s is infected with %s', $event->getSubjectParameters()));\n-\t\t\t\tbreak;\n-\t\t}\n+\t\tif ($event->getSubject() === self::SUBJECT_VIRUS_DETECTED) {\n+\t\t\t$event->setParsedSubject($l->t('File %s is infected with %s', $event->getSubjectParameters()));\n+\t\t\tif ($event->getMessage() === self::MESSAGE_FILE_DELETED) {\n+\t\t\t\t$event->setParsedMessage($l->t('The file has been removed'));\n+\t\t\t}\n+\n+\t\t} else if ($event->getSubject() === self::SUBJECT_VIRUS_DETECTED_UPLOAD) {\n+\t\t\t$event->setParsedSubject($l->t('File containing %s detected', $event->getSubjectParameters()));","path":"lib/Activity/Provider.php","position":47,"original_position":47,"commit_id":"82c21775b6dce3c030e70573485551a03bcb78b1","original_commit_id":"82c21775b6dce3c030e70573485551a03bcb78b1","user":{"login":"nickvergessen","id":213943,"avatar_url":"https://avatars3.githubusercontent.com/u/213943?v=4","gravatar_id":"","url":"https://api.github.com/users/nickvergessen","html_url":"https://github.com/nickvergessen","followers_url":"https://api.github.com/users/nickvergessen/followers","following_url":"https://api.github.com/users/nickvergessen/following{/other_user}","gists_url":"https://api.github.com/users/nickvergessen/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvergessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvergessen/subscriptions","organizations_url":"https://api.github.com/users/nickvergessen/orgs","repos_url":"https://api.github.com/users/nickvergessen/repos","events_url":"https://api.github.com/users/nickvergessen/events{/privacy}","received_events_url":"https://api.github.com/users/nickvergessen/received_events","type":"User","site_admin":false},"body":"comment failed: \"same here\"","created_at":"2018-03-06T12:55:15Z","updated_at":"2018-03-06T12:55:15Z","html_url":"https://github.com/nextcloud/files_antivirus/pull/69#discussion_r172505990","pull_request_url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/comments/172505990"},"html":{"href":"https://github.com/nextcloud/files_antivirus/pull/69#discussion_r172505990"},"pull_request":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69","id":173148384,"html_url":"https://github.com/nextcloud/files_antivirus/pull/69","diff_url":"https://github.com/nextcloud/files_antivirus/pull/69.diff","patch_url":"https://github.com/nextcloud/files_antivirus/pull/69.patch","issue_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues/69","number":69,"state":"open","locked":false,"title":"Improve activities","user":{"login":"rullzer","id":45821,"avatar_url":"https://avatars2.githubusercontent.com/u/45821?v=4","gravatar_id":"","url":"https://api.github.com/users/rullzer","html_url":"https://github.com/rullzer","followers_url":"https://api.github.com/users/rullzer/followers","following_url":"https://api.github.com/users/rullzer/following{/other_user}","gists_url":"https://api.github.com/users/rullzer/gists{/gist_id}","starred_url":"https://api.github.com/users/rullzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rullzer/subscriptions","organizations_url":"https://api.github.com/users/rullzer/orgs","repos_url":"https://api.github.com/users/rullzer/repos","events_url":"https://api.github.com/users/rullzer/events{/privacy}","received_events_url":"https://api.github.com/users/rullzer/received_events","type":"User","site_admin":false},"body":"Now it kinda looks like:\r\n\r\n![new_activity](https://user-images.githubusercontent.com/45821/37033035-c5dad080-2144-11e8-8769-17fabe8d1089.png)\r\n\r\n\r\nSo from bottom to top.\r\n\r\n1. Uploading a file containing a virus with the virus scanner enabled\r\n  - This results in a green shield\r\n  - File is deleted/not uploaded\r\n2. Uploading a file with a virus with the virus scanner disabled\r\n  - Normal upload\r\n3. Background scan with only logging\r\n  - Red shield (since the file remains and action might be needed)\r\n  - Rich link (you can click it!)\r\n4. Background scan with deletion as well\r\n  - Green shield (no more bad file)\r\n \r\nObviously the badges look crappy now. But I needed something to distinguish the cases.\r\n\r\n@nextcloud/designers  @MorrisJobke \r\n@nickvergessen for general activity stuff :)\r\n","created_at":"2018-03-06T12:49:39Z","updated_at":"2018-03-06T12:55:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d0bc3eb73b3d4f1e938d1dd5c9c78f5a97e0058","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/nextcloud/files_antivirus/milestones/26","html_url":"https://github.com/nextcloud/files_antivirus/milestone/26","labels_url":"https://api.github.com/repos/nextcloud/files_antivirus/milestones/26/labels","id":2950865,"number":26,"title":"1.2.0","description":"","creator":{"login":"MorrisJobke","id":245432,"avatar_url":"https://avatars3.githubusercontent.com/u/245432?v=4","gravatar_id":"","url":"https://api.github.com/users/MorrisJobke","html_url":"https://github.com/MorrisJobke","followers_url":"https://api.github.com/users/MorrisJobke/followers","following_url":"https://api.github.com/users/MorrisJobke/following{/other_user}","gists_url":"https://api.github.com/users/MorrisJobke/gists{/gist_id}","starred_url":"https://api.github.com/users/MorrisJobke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorrisJobke/subscriptions","organizations_url":"https://api.github.com/users/MorrisJobke/orgs","repos_url":"https://api.github.com/users/MorrisJobke/repos","events_url":"https://api.github.com/users/MorrisJobke/events{/privacy}","received_events_url":"https://api.github.com/users/MorrisJobke/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":22,"state":"open","created_at":"2017-12-01T10:06:53Z","updated_at":"2018-03-06T12:49:39Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69/commits","review_comments_url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69/comments","review_comment_url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues/69/comments","statuses_url":"https://api.github.com/repos/nextcloud/files_antivirus/statuses/82c21775b6dce3c030e70573485551a03bcb78b1","head":{"label":"nextcloud:improve_activities","ref":"improve_activities","sha":"82c21775b6dce3c030e70573485551a03bcb78b1","user":{"login":"nextcloud","id":19211038,"avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":67203815,"name":"files_antivirus","full_name":"nextcloud/files_antivirus","owner":{"login":"nextcloud","id":19211038,"avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextcloud/files_antivirus","description":"👾 Antivirus app for Nextcloud","fork":false,"url":"https://api.github.com/repos/nextcloud/files_antivirus","forks_url":"https://api.github.com/repos/nextcloud/files_antivirus/forks","keys_url":"https://api.github.com/repos/nextcloud/files_antivirus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextcloud/files_antivirus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextcloud/files_antivirus/teams","hooks_url":"https://api.github.com/repos/nextcloud/files_antivirus/hooks","issue_events_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues/events{/number}","events_url":"https://api.github.com/repos/nextcloud/files_antivirus/events","assignees_url":"https://api.github.com/repos/nextcloud/files_antivirus/assignees{/user}","branches_url":"https://api.github.com/repos/nextcloud/files_antivirus/branches{/branch}","tags_url":"https://api.github.com/repos/nextcloud/files_antivirus/tags","blobs_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextcloud/files_antivirus/statuses/{sha}","languages_url":"https://api.github.com/repos/nextcloud/files_antivirus/languages","stargazers_url":"https://api.github.com/repos/nextcloud/files_antivirus/stargazers","contributors_url":"https://api.github.com/repos/nextcloud/files_antivirus/contributors","subscribers_url":"https://api.github.com/repos/nextcloud/files_antivirus/subscribers","subscription_url":"https://api.github.com/repos/nextcloud/files_antivirus/subscription","commits_url":"https://api.github.com/repos/nextcloud/files_antivirus/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextcloud/files_antivirus/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextcloud/files_antivirus/contents/{+path}","compare_url":"https://api.github.com/repos/nextcloud/files_antivirus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextcloud/files_antivirus/merges","archive_url":"https://api.github.com/repos/nextcloud/files_antivirus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextcloud/files_antivirus/downloads","issues_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues{/number}","pulls_url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls{/number}","milestones_url":"https://api.github.com/repos/nextcloud/files_antivirus/milestones{/number}","notifications_url":"https://api.github.com/repos/nextcloud/files_antivirus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextcloud/files_antivirus/labels{/name}","releases_url":"https://api.github.com/repos/nextcloud/files_antivirus/releases{/id}","deployments_url":"https://api.github.com/repos/nextcloud/files_antivirus/deployments","created_at":"2016-09-02T08:09:36Z","updated_at":"2018-03-06T09:19:52Z","pushed_at":"2018-03-06T12:49:40Z","git_url":"git://github.com/nextcloud/files_antivirus.git","ssh_url":"git@github.com:nextcloud/files_antivirus.git","clone_url":"https://github.com/nextcloud/files_antivirus.git","svn_url":"https://github.com/nextcloud/files_antivirus","homepage":"","size":767,"stargazers_count":23,"watchers_count":23,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":9,"open_issues":10,"watchers":23,"default_branch":"master"}},"base":{"label":"nextcloud:master","ref":"master","sha":"08f8fe790ae4f93d8bc26a2b70742e0b00e669a4","user":{"login":"nextcloud","id":19211038,"avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"repo":{"id":67203815,"name":"files_antivirus","full_name":"nextcloud/files_antivirus","owner":{"login":"nextcloud","id":19211038,"avatar_url":"https://avatars1.githubusercontent.com/u/19211038?v=4","gravatar_id":"","url":"https://api.github.com/users/nextcloud","html_url":"https://github.com/nextcloud","followers_url":"https://api.github.com/users/nextcloud/followers","following_url":"https://api.github.com/users/nextcloud/following{/other_user}","gists_url":"https://api.github.com/users/nextcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/nextcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextcloud/subscriptions","organizations_url":"https://api.github.com/users/nextcloud/orgs","repos_url":"https://api.github.com/users/nextcloud/repos","events_url":"https://api.github.com/users/nextcloud/events{/privacy}","received_events_url":"https://api.github.com/users/nextcloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextcloud/files_antivirus","description":"👾 Antivirus app for Nextcloud","fork":false,"url":"https://api.github.com/repos/nextcloud/files_antivirus","forks_url":"https://api.github.com/repos/nextcloud/files_antivirus/forks","keys_url":"https://api.github.com/repos/nextcloud/files_antivirus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextcloud/files_antivirus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextcloud/files_antivirus/teams","hooks_url":"https://api.github.com/repos/nextcloud/files_antivirus/hooks","issue_events_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues/events{/number}","events_url":"https://api.github.com/repos/nextcloud/files_antivirus/events","assignees_url":"https://api.github.com/repos/nextcloud/files_antivirus/assignees{/user}","branches_url":"https://api.github.com/repos/nextcloud/files_antivirus/branches{/branch}","tags_url":"https://api.github.com/repos/nextcloud/files_antivirus/tags","blobs_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextcloud/files_antivirus/statuses/{sha}","languages_url":"https://api.github.com/repos/nextcloud/files_antivirus/languages","stargazers_url":"https://api.github.com/repos/nextcloud/files_antivirus/stargazers","contributors_url":"https://api.github.com/repos/nextcloud/files_antivirus/contributors","subscribers_url":"https://api.github.com/repos/nextcloud/files_antivirus/subscribers","subscription_url":"https://api.github.com/repos/nextcloud/files_antivirus/subscription","commits_url":"https://api.github.com/repos/nextcloud/files_antivirus/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextcloud/files_antivirus/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextcloud/files_antivirus/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextcloud/files_antivirus/contents/{+path}","compare_url":"https://api.github.com/repos/nextcloud/files_antivirus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextcloud/files_antivirus/merges","archive_url":"https://api.github.com/repos/nextcloud/files_antivirus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextcloud/files_antivirus/downloads","issues_url":"https://api.github.com/repos/nextcloud/files_antivirus/issues{/number}","pulls_url":"https://api.github.com/repos/nextcloud/files_antivirus/pulls{/number}","milestones_url":"https://api.github.com/repos/nextcloud/files_antivirus/milestones{/number}","notifications_url":"https://api.github.com/repos/nextcloud/files_antivirus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextcloud/files_antivirus/labels{/name}","releases_url":"https://api.github.com/repos/nextcloud/files_antivirus/releases{/id}","deployments_url":"https://api.github.com/repos/nextcloud/files_antivirus/deployments","created_at":"2016-09-02T08:09:36Z","updated_at":"2018-03-06T09:19:52Z","pushed_at":"2018-03-06T12:49:40Z","git_url":"git://github.com/nextcloud/files_antivirus.git","ssh_url":"git@github.com:nextcloud/files_antivirus.git","clone_url":"https://github.com/nextcloud/files_antivirus.git","svn_url":"https://github.com/nextcloud/files_antivirus","homepage":"","size":767,"stargazers_count":23,"watchers_count":23,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":9,"open_issues":10,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69"},"html":{"href":"https://github.com/nextcloud/files_antivirus/pull/69"},"issue":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/issues/69"},"comments":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/nextcloud/files_antivirus/statuses/82c21775b6dce3c030e70573485551a03bcb78b1"}},"author_association":"OWNER"}}
{"actor":{"display_login":"nickvergessen"}}