Skip to content

Commit 2a54433

Browse files
authored
Merge pull request #1370 from nextcloud/wellknow-update
Make wellknow work with new api
2 parents 25f34f2 + b4006e7 commit 2a54433

File tree

7 files changed

+104
-505
lines changed

7 files changed

+104
-505
lines changed

lib/AppInfo/Application.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@
3737
use OCA\Social\Search\UnifiedSearchProvider;
3838
use OCA\Social\Service\ConfigService;
3939
use OCA\Social\Service\UpdateService;
40+
use OCA\Social\WellKnown\WebfingerHandler;
4041
use OCP\AppFramework\App;
4142
use OCP\AppFramework\Bootstrap\IBootContext;
4243
use OCP\AppFramework\Bootstrap\IBootstrap;
4344
use OCP\AppFramework\Bootstrap\IRegistrationContext;
4445
use OCP\AppFramework\QueryException;
46+
use OCP\IDBConnection;
4547
use OCP\IServerContainer;
4648
use Throwable;
4749

@@ -53,16 +55,8 @@
5355
* @package OCA\Social\AppInfo
5456
*/
5557
class 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
}

lib/Db/CoreRequestBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function __construct(
112112
) {
113113
$this->dbConnection = $connection;
114114
$this->logger = $logger;
115-
$this->loggerInterface = $loggerInterface;
115+
$this->loggerInterface = $logger;
116116
$this->urlGenerator = $urlGenerator;
117117
$this->configService = $configService;
118118
$this->miscService = $miscService;

lib/Listeners/WellKnownListener.php

Lines changed: 0 additions & 83 deletions
This file was deleted.

lib/Model/WebfingerLink.php

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)