3535use OCP \IURLGenerator ;
3636use OCP \IUserManager ;
3737use OCP \L10N \IFactory ;
38+ use OCP \Mail \IEmailValidator ;
3839use OCP \Mail \IMailer ;
40+ use OCP \Notification \IManager as INotificationManager ;
3941use OCP \RichObjectStrings \IValidator ;
4042use OCP \Share \Events \BeforeShareDeletedEvent ;
4143use OCP \Share \Events \ShareCreatedEvent ;
@@ -118,6 +120,7 @@ public function register(IRegistrationContext $context): void {
118120 $ c ->get (Data::class),
119121 $ c ->get (GroupHelper::class),
120122 $ c ->get (UserSettings::class),
123+ $ c ->get (IEmailValidator::class),
121124 );
122125 });
123126
@@ -144,25 +147,24 @@ public function boot(IBootContext $context): void {
144147 /**
145148 * Registers the consumer to the Activity Manager
146149 */
147- private function registerActivityConsumer () {
150+ private function registerActivityConsumer (): void {
148151 $ c = $ this ->getContainer ();
149- /** @var \OCP\IServerContainer $server */
150152 $ server = $ c ->getServer ();
151153
152- $ server ->getActivityManager ( )->registerConsumer (function () use ($ c ) {
153- return $ c ->query (Consumer::class);
154+ $ server ->get (IManager::class )->registerConsumer (function () use ($ c ) {
155+ return $ c ->get (Consumer::class);
154156 });
155157 }
156158
157- public function registerNotifier () {
159+ public function registerNotifier (): void {
158160 $ server = $ this ->getContainer ()->getServer ();
159- $ server ->getNotificationManager ( )->registerNotifierService (NotificationGenerator::class);
161+ $ server ->get (INotificationManager::class )->registerNotifierService (NotificationGenerator::class);
160162 }
161163
162164 /**
163165 * Register the hooks for filesystem operations
164166 */
165- private function registerFilesActivity (IRegistrationContext $ context ) {
167+ private function registerFilesActivity (IRegistrationContext $ context ): void {
166168 // All other events from other apps have to be send via the Consumer
167169 Util::connectHook ('OC_Filesystem ' , 'post_create ' , FilesHooksStatic::class, 'fileCreate ' );
168170 Util::connectHook ('OC_Filesystem ' , 'post_update ' , FilesHooksStatic::class, 'fileUpdate ' );
0 commit comments