Skip to content

Commit

Permalink
Merge pull request #1370 from nextcloud/wellknow-update
Browse files Browse the repository at this point in the history
Make wellknow work with new api
  • Loading branch information
CarlSchwan authored Apr 15, 2022
2 parents 25f34f2 + b4006e7 commit 2a54433
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 505 deletions.
16 changes: 4 additions & 12 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
use OCA\Social\Search\UnifiedSearchProvider;
use OCA\Social\Service\ConfigService;
use OCA\Social\Service\UpdateService;
use OCA\Social\WellKnown\WebfingerHandler;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\QueryException;
use OCP\IDBConnection;
use OCP\IServerContainer;
use Throwable;

Expand All @@ -53,16 +55,8 @@
* @package OCA\Social\AppInfo
*/
class Application extends App implements IBootstrap {


const APP_NAME = 'social';


/**
* Application constructor.
*
* @param array $params
*/
public function __construct(array $params = []) {
parent::__construct(self::APP_NAME, $params);
}
Expand All @@ -73,9 +67,7 @@ public function __construct(array $params = []) {
*/
public function register(IRegistrationContext $context): void {
$context->registerSearchProvider(UnifiedSearchProvider::class);

// TODO: nc21, uncomment
// $context->registerEventListener(WellKnownEvent::class, WellKnownListener::class);
$context->registerWellKnownHandler(WebfingerHandler::class);
}


Expand Down Expand Up @@ -114,7 +106,7 @@ protected function checkUpgradeStatus(IServerContainer $container) {
return;
}

$schema = new SchemaWrapper($container->getDatabaseConnection());
$schema = new SchemaWrapper($container->get(IDBConnection::class));
if ($schema->hasTable('social_a2_stream')) {
$updateService->checkUpdateStatus();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/CoreRequestBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function __construct(
) {
$this->dbConnection = $connection;
$this->logger = $logger;
$this->loggerInterface = $loggerInterface;
$this->loggerInterface = $logger;
$this->urlGenerator = $urlGenerator;
$this->configService = $configService;
$this->miscService = $miscService;
Expand Down
83 changes: 0 additions & 83 deletions lib/Listeners/WellKnownListener.php

This file was deleted.

148 changes: 0 additions & 148 deletions lib/Model/WebfingerLink.php

This file was deleted.

Loading

0 comments on commit 2a54433

Please sign in to comment.