{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/25443","repository_url":"https://api.github.com/repos/owncloud/core","labels_url":"https://api.github.com/repos/owncloud/core/issues/25443/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/25443/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/25443/events","html_url":"https://github.com/owncloud/core/issues/25443","id":164871187,"number":25443,"title":"Delete and rename hooks not being fired","user":{"login":"fulvio-m","id":3943127,"avatar_url":"https://avatars0.githubusercontent.com/u/3943127?v=4","gravatar_id":"","url":"https://api.github.com/users/fulvio-m","html_url":"https://github.com/fulvio-m","followers_url":"https://api.github.com/users/fulvio-m/followers","following_url":"https://api.github.com/users/fulvio-m/following{/other_user}","gists_url":"https://api.github.com/users/fulvio-m/gists{/gist_id}","starred_url":"https://api.github.com/users/fulvio-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulvio-m/subscriptions","organizations_url":"https://api.github.com/users/fulvio-m/orgs","repos_url":"https://api.github.com/users/fulvio-m/repos","events_url":"https://api.github.com/users/fulvio-m/events{/privacy}","received_events_url":"https://api.github.com/users/fulvio-m/received_events","type":"User","site_admin":false},"labels":[{"id":12470597,"url":"https://api.github.com/repos/owncloud/core/labels/needs%20info","name":"needs info","color":"0b02e1","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-11T15:52:30Z","updated_at":"2017-12-21T01:05:57Z","closed_at":"2016-07-12T09:44:03Z","author_association":"NONE","body":"I'm writing a simple app to notify an external system (it will be an ActiveMQ, but it can be anything really) about changes happening in Owncloud files.\nI can see create and change hooks being fired, but not rename and delete.\n\nI've stripped everything and the barebone structure is below.\n`post_create` is called just fine, i can see the log there, but not `delete`, `post_delete` and `post_rename`: nothing is logged.\n\nI can see that the Activity app also doesn't append changes based on those triggers.\n\nOwncloud version is 9.0.2 on CentOS 7.2.1511, PHP 7.0.8.\n\nMy need is to notify this external system about any change, if this can somehow be done in a different way, in **any** way, i'm all ears.\n\nThanks in advance.\n\n`myapp/appinfo/app.php`\n\n```\nnamespace OCA\\MyApp\\AppInfo;\n\nuse \\OCP\\AppFramework\\App;\nuse \\OCA\\MyApp\\UserHooks;\n\nrequire_once __DIR__ . '/autoload.php';\n$app = new Application();\n```\n\n`mypp/appinfo/application.php`\n\n```\nnamespace OCA\\MyApp\\AppInfo;\n\nuse \\OCP\\AppFramework\\App;\nuse \\OCA\\MyApp\\FileHooks;\n\nclass Application extends App {\n\n  public function __construct(array $urlParams=array()){\n    parent::__construct('myapp', $urlParams);\n\n    \\OCP\\Util::connectHook('OC_Filesystem', 'delete', 'OCA\\MyApp\\FileHooks', 'delete');\n    \\OCP\\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\\MyApp\\FileHooks', 'delete');\n    \\OCP\\Util::connectHook('OC_Filesystem', 'post_rename', 'OCA\\MyApp\\FileHooks', 'postRename');\n    \\OCP\\Util::connectHook('OC_Filesystem', 'post_create', 'OCA\\MyApp\\FileHooks', 'fileCreate');\n  }\n}\n```\n\n`myapp/lib/filehooks.php`\n\n```\nnamespace OCA\\MyApp;\n\nclass FileHooks {\n  public static function delete($params) {\n    error_log(\"File delete\");\n  }\n\n  public static function fileCreate($params) {\n    error_log(\"File create\");\n  }\n\n  public static function postRename($params) {\n    error_log(\"File post_rename\");\n  }\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/353228098","html_url":"https://github.com/owncloud/core/issues/25443#issuecomment-353228098","issue_url":"https://api.github.com/repos/owncloud/core/issues/25443","id":353228098,"user":{"login":"ownclouders","id":29553947,"avatar_url":"https://avatars3.githubusercontent.com/u/29553947?v=4","gravatar_id":"","url":"https://api.github.com/users/ownclouders","html_url":"https://github.com/ownclouders","followers_url":"https://api.github.com/users/ownclouders/followers","following_url":"https://api.github.com/users/ownclouders/following{/other_user}","gists_url":"https://api.github.com/users/ownclouders/gists{/gist_id}","starred_url":"https://api.github.com/users/ownclouders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ownclouders/subscriptions","organizations_url":"https://api.github.com/users/ownclouders/orgs","repos_url":"https://api.github.com/users/ownclouders/repos","events_url":"https://api.github.com/users/ownclouders/events{/privacy}","received_events_url":"https://api.github.com/users/ownclouders/received_events","type":"User","site_admin":false},"created_at":"2017-12-21T01:05:57Z","updated_at":"2017-12-21T01:05:57Z","author_association":"NONE","body":"Hey, this issue has been closed because the label `needs info` is set and there were no updates for 14 days. Feel free to reopen this issue if you deem it appropriate.\n\n(This is an automated comment from [GitMate.io](https://gitmate.io)."}}
{"actor":{"display_login":"ownclouders"}}