Send notifications when a board gets shared

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-09-18 13:53:33 +02:00
committed by Julius Härtl
parent e0bab217a0
commit 52fc971529
4 changed files with 151 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ namespace OCA\Deck\AppInfo;
use OCA\Deck\Db\Acl;
use OCA\Deck\Db\AclMapper;
use OCA\Deck\Notification\Notifier;
use OCP\AppFramework\App;
use OCA\Deck\Middleware\SharingMiddleware;
use OCP\IGroup;
@@ -93,4 +94,15 @@ class Application extends App {
];
});
}
public function registerNotifications() {
$notificationManager = \OC::$server->getNotificationManager();
$self = &$this;
$notificationManager->registerNotifier(function() use (&$self) {
return $self->getContainer()->query(Notifier::class);
}, function () {
return ['id' => 'deck', 'name' => 'Deck'];
});
}
}