Skip to content

Commit

Permalink
NC 18 Flow integration #10
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Jan 14, 2020
1 parent 41a3e81 commit f2c8300
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/Flow/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2c8300

Please sign in to comment.