3737use OCA \Social \Search \UnifiedSearchProvider ;
3838use OCA \Social \Service \ConfigService ;
3939use OCA \Social \Service \UpdateService ;
40+ use OCA \Social \WellKnown \WebfingerHandler ;
4041use OCP \AppFramework \App ;
4142use OCP \AppFramework \Bootstrap \IBootContext ;
4243use OCP \AppFramework \Bootstrap \IBootstrap ;
4344use OCP \AppFramework \Bootstrap \IRegistrationContext ;
4445use OCP \AppFramework \QueryException ;
46+ use OCP \IDBConnection ;
4547use OCP \IServerContainer ;
4648use Throwable ;
4749
5355 * @package OCA\Social\AppInfo
5456 */
5557class Application extends App implements IBootstrap {
56-
57-
5858 const APP_NAME = 'social ' ;
5959
60-
61- /**
62- * Application constructor.
63- *
64- * @param array $params
65- */
6660 public function __construct (array $ params = []) {
6761 parent ::__construct (self ::APP_NAME , $ params );
6862 }
@@ -73,9 +67,7 @@ public function __construct(array $params = []) {
7367 */
7468 public function register (IRegistrationContext $ context ): void {
7569 $ context ->registerSearchProvider (UnifiedSearchProvider::class);
76-
77- // TODO: nc21, uncomment
78- // $context->registerEventListener(WellKnownEvent::class, WellKnownListener::class);
70+ $ context ->registerWellKnownHandler (WebfingerHandler::class);
7971 }
8072
8173
@@ -114,7 +106,7 @@ protected function checkUpgradeStatus(IServerContainer $container) {
114106 return ;
115107 }
116108
117- $ schema = new SchemaWrapper ($ container ->getDatabaseConnection ( ));
109+ $ schema = new SchemaWrapper ($ container ->get (IDBConnection::class ));
118110 if ($ schema ->hasTable ('social_a2_stream ' )) {
119111 $ updateService ->checkUpdateStatus ();
120112 }
0 commit comments