- When a file was unshared, the legacy hook pre_unshare fired twice and the hook post_unshare did not fire at all. This was obviously a copy-paste error.
Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
$formatted['deletedShares'] = $formattedDeletedShares;
- \OC_Hook::emit('OCP\Share', 'pre_unshare', $formatted);
+ \OC_Hook::emit('OCP\Share', 'post_unshare', $formatted);
}
private function formatHookParams(IShare $share) {
->setTarget('myTarget');
$hookListner = $this->getMockBuilder('Dummy')->setMethods(['post'])->getMock();
- \OCP\Util::connectHook('OCP\Share', 'pre_unshare', $hookListner, 'post');
+ \OCP\Util::connectHook('OCP\Share', 'post_unshare', $hookListner, 'post');
$hookListnerExpectsPost = [
'id' => 42,