config->getValue('instanceid', null) !== null) { $this->root->listen('\OC\Files', 'postWrite', function (Node $node) { $this->getWatcher()->postWrite($node); }); $this->dispatcher->addListener(VersionRestoredEvent::class, function (VersionRestoredEvent $event) { $this->getWatcher()->versionRollback(['node' => $event->getVersion()->getSourceFile()]); }); } } }