diff --git a/lib/Flow/Operation.php b/lib/Flow/Operation.php index 0ab2f4e8..5d12b820 100644 --- a/lib/Flow/Operation.php +++ b/lib/Flow/Operation.php @@ -52,11 +52,13 @@ public function __construct( public static function register(IEventDispatcher $dispatcher): void { - $dispatcher->addListener(IManager::EVENT_NAME_REG_OPERATION, function (GenericEvent $event) { - $operation = \OC::$server->query(Operation::class); - $event->getSubject()->registerOperation($operation); - Util::addScript('analytics', 'flow'); - }); + if (interface_exists(IRuleMatcher::class)) { + $dispatcher->addListener(IManager::EVENT_NAME_REG_OPERATION, function (GenericEvent $event) { + $operation = \OC::$server->query(Operation::class); + $event->getSubject()->registerOperation($operation); + Util::addScript('analytics', 'flow'); + }); + } } public function getDisplayName(): string