kopia lustrzana https://github.com/nextcloud/social
Merge pull request #1369 from nextcloud/24-compatibility
Make social app compatible with 24pull/1370/head
commit
f07c9bb2a3
|
@ -35,7 +35,7 @@
|
|||
<database>pgsql</database>
|
||||
<database>sqlite</database>
|
||||
<database>mysql</database>
|
||||
<nextcloud min-version="20" max-version="21"/>
|
||||
<nextcloud min-version="24" max-version="24"/>
|
||||
</dependencies>
|
||||
|
||||
<background-jobs>
|
||||
|
|
|
@ -63,57 +63,31 @@ use OCP\IURLGenerator;
|
|||
* @package OCA\Social\Controller
|
||||
*/
|
||||
class NavigationController extends Controller {
|
||||
|
||||
|
||||
use TArrayTools;
|
||||
use TNCDataResponse;
|
||||
|
||||
private ?string $userId = null;
|
||||
private IConfig $config;
|
||||
private IURLGenerator $urlGenerator;
|
||||
private AccountService $accountService;
|
||||
private DocumentService $documentService;
|
||||
private ConfigService $configService;
|
||||
private MiscService $miscService;
|
||||
private IL10N $l10n;
|
||||
private CheckService $checkService;
|
||||
|
||||
/** @var string */
|
||||
private $userId;
|
||||
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
|
||||
/** @var IURLGenerator */
|
||||
private $urlGenerator;
|
||||
|
||||
/** @var AccountService */
|
||||
private $accountService;
|
||||
|
||||
private $documentService;
|
||||
|
||||
/** @var ConfigService */
|
||||
private $configService;
|
||||
|
||||
/** @var MiscService */
|
||||
private $miscService;
|
||||
|
||||
/** @var IL10N */
|
||||
private $l10n;
|
||||
|
||||
/** @var CheckService */
|
||||
private $checkService;
|
||||
|
||||
|
||||
/**
|
||||
* NavigationController constructor.
|
||||
*
|
||||
* @param IL10N $l10n
|
||||
* @param IRequest $request
|
||||
* @param string $userId
|
||||
* @param IConfig $config
|
||||
* @param IURLGenerator $urlGenerator
|
||||
* @param AccountService $accountService
|
||||
* @param DocumentService $documentService
|
||||
* @param ConfigService $configService
|
||||
* @param CheckService $checkService
|
||||
* @param MiscService $miscService
|
||||
*/
|
||||
public function __construct(
|
||||
IL10N $l10n, IRequest $request, $userId, IConfig $config, IInitialStateService $initialStateService, IURLGenerator $urlGenerator,
|
||||
AccountService $accountService, DocumentService $documentService,
|
||||
ConfigService $configService, CheckService $checkService, MiscService $miscService
|
||||
IL10N $l10n,
|
||||
IRequest $request,
|
||||
?string $userId,
|
||||
IConfig $config,
|
||||
IInitialStateService $initialStateService,
|
||||
IURLGenerator $urlGenerator,
|
||||
AccountService $accountService,
|
||||
DocumentService $documentService,
|
||||
ConfigService $configService,
|
||||
CheckService $checkService,
|
||||
MiscService $miscService
|
||||
) {
|
||||
parent::__construct(Application::APP_NAME, $request);
|
||||
|
||||
|
@ -137,9 +111,6 @@ class NavigationController extends Controller {
|
|||
* @NoCSRFRequired
|
||||
* @NoAdminRequired
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return TemplateResponse
|
||||
* @throws UrlCloudException
|
||||
* @throws SocialAppConfigException
|
||||
*/
|
||||
|
@ -241,9 +212,6 @@ class NavigationController extends Controller {
|
|||
* @NoCSRFRequired
|
||||
* @NoAdminRequired
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
* @return TemplateResponse
|
||||
* @throws UrlCloudException
|
||||
* @throws SocialAppConfigException
|
||||
*/
|
||||
|
|
|
@ -45,15 +45,8 @@ use OCA\Social\Model\ActivityPub\ACore;
|
|||
*/
|
||||
class ActionsRequestBuilder extends CoreRequestBuilder {
|
||||
|
||||
|
||||
use TArrayTools;
|
||||
|
||||
|
||||
/**
|
||||
* Base of the Sql Insert request
|
||||
*
|
||||
* @return SocialQueryBuilder
|
||||
*/
|
||||
protected function getActionsInsertSql(): SocialQueryBuilder {
|
||||
$qb = $this->getQueryBuilder();
|
||||
$qb->insert(self::TABLE_ACTIONS);
|
||||
|
@ -64,8 +57,6 @@ class ActionsRequestBuilder extends CoreRequestBuilder {
|
|||
|
||||
/**
|
||||
* Base of the Sql Update request
|
||||
*
|
||||
* @return SocialQueryBuilder
|
||||
*/
|
||||
protected function getActionsUpdateSql(): SocialQueryBuilder {
|
||||
$qb = $this->getQueryBuilder();
|
||||
|
@ -77,8 +68,6 @@ class ActionsRequestBuilder extends CoreRequestBuilder {
|
|||
|
||||
/**
|
||||
* Base of the Sql Select request for Shares
|
||||
*
|
||||
* @return SocialQueryBuilder
|
||||
*/
|
||||
protected function getActionsSelectSql(): SocialQueryBuilder {
|
||||
$qb = $this->getQueryBuilder();
|
||||
|
|
|
@ -46,8 +46,8 @@ use OCA\Social\Service\ConfigService;
|
|||
use OCA\Social\Service\MiscService;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\ILogger;
|
||||
use OCP\IURLGenerator;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -57,7 +57,6 @@ use OCP\IURLGenerator;
|
|||
*/
|
||||
class CoreRequestBuilder {
|
||||
|
||||
|
||||
const TABLE_REQUEST_QUEUE = 'social_3_req_queue';
|
||||
const TABLE_INSTANCE = 'social_3_instance';
|
||||
|
||||
|
@ -99,44 +98,21 @@ class CoreRequestBuilder {
|
|||
self::TABLE_CLIENT_TOKEN
|
||||
];
|
||||
|
||||
protected LoggerInterface $logger;
|
||||
protected IURLGenerator $urlGenerator;
|
||||
protected IDBConnection $dbConnection;
|
||||
protected ConfigService $configService;
|
||||
protected MiscService $miscService;
|
||||
protected ?Person $viewer = null;
|
||||
protected ?string $defaultSelectAlias = null;
|
||||
|
||||
/** @var ILogger */
|
||||
protected $logger;
|
||||
|
||||
/** @var IURLGenerator */
|
||||
protected $urlGenerator;
|
||||
|
||||
/** @var IDBConnection */
|
||||
protected $dbConnection;
|
||||
|
||||
/** @var ConfigService */
|
||||
protected $configService;
|
||||
|
||||
/** @var MiscService */
|
||||
protected $miscService;
|
||||
|
||||
/** @var Person */
|
||||
protected $viewer = null;
|
||||
|
||||
/** @var string */
|
||||
protected $defaultSelectAlias;
|
||||
|
||||
|
||||
/**
|
||||
* CoreRequestBuilder constructor.
|
||||
*
|
||||
* @param IDBConnection $connection
|
||||
* @param ILogger $logger
|
||||
* @param IURLGenerator $urlGenerator
|
||||
* @param ConfigService $configService
|
||||
* @param MiscService $miscService
|
||||
*/
|
||||
public function __construct(
|
||||
IDBConnection $connection, ILogger $logger, IURLGenerator $urlGenerator, ConfigService $configService,
|
||||
IDBConnection $connection, LoggerInterface $logger, IURLGenerator $urlGenerator, ConfigService $configService,
|
||||
MiscService $miscService
|
||||
) {
|
||||
$this->dbConnection = $connection;
|
||||
$this->logger = $logger;
|
||||
$this->loggerInterface = $loggerInterface;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
$this->configService = $configService;
|
||||
$this->miscService = $miscService;
|
||||
|
|
|
@ -36,8 +36,8 @@ use OC\SystemConfig;
|
|||
use OCA\Social\Model\ActivityPub\Actor\Person;
|
||||
use OCP\DB\QueryBuilder\ICompositeExpression;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\ILogger;
|
||||
use OCP\IURLGenerator;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -46,33 +46,18 @@ use OCP\IURLGenerator;
|
|||
* @package OCA\Social\Db
|
||||
*/
|
||||
class SocialCoreQueryBuilder extends ExtendedQueryBuilder {
|
||||
|
||||
|
||||
/** @var IURLGenerator */
|
||||
protected $urlGenerator;
|
||||
|
||||
/** @var Person */
|
||||
private $viewer = null;
|
||||
|
||||
|
||||
/** @var int */
|
||||
private $chunk = 0;
|
||||
|
||||
protected IURLGenerator $urlGenerator;
|
||||
private ?Person $viewer = null;
|
||||
private int $chunk = 0;
|
||||
|
||||
public function __construct(
|
||||
IDBConnection $connection, SystemConfig $systemConfig, ILogger $logger, IURLGenerator $urlGenerator
|
||||
IDBConnection $connection, SystemConfig $systemConfig, LoggerInterface $logger, IURLGenerator $urlGenerator
|
||||
) {
|
||||
parent::__construct($connection, $systemConfig, $logger);
|
||||
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param int $chunk
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setChunk(int $chunk): self {
|
||||
$this->chunk = $chunk;
|
||||
$this->inChunk();
|
||||
|
@ -80,20 +65,14 @@ class SocialCoreQueryBuilder extends ExtendedQueryBuilder {
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getChunk(): int {
|
||||
return $this->chunk;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit the request to a chunk
|
||||
*
|
||||
* @param string $alias
|
||||
* @param ICompositeExpression|null $expr
|
||||
*/
|
||||
public function inChunk(string $alias = '', ICompositeExpression $expr = null) {
|
||||
public function inChunk(string $alias = '', ?ICompositeExpression $expr = null): void {
|
||||
if ($this->getChunk() === 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -106,34 +85,18 @@ class SocialCoreQueryBuilder extends ExtendedQueryBuilder {
|
|||
$this->limitToDBFieldInt('chunk', $this->getChunk(), $alias);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function hasViewer(): bool {
|
||||
return ($this->viewer !== null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Person $viewer
|
||||
*/
|
||||
public function setViewer(Person $viewer): void {
|
||||
$this->viewer = $viewer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Person
|
||||
*/
|
||||
public function getViewer(): Person {
|
||||
return $this->viewer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function prim(string $id): string {
|
||||
if ($id === '') {
|
||||
return '';
|
||||
|
@ -141,6 +104,5 @@ class SocialCoreQueryBuilder extends ExtendedQueryBuilder {
|
|||
|
||||
return hash('sha512', $id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ use OCA\Social\Service\CacheActorService;
|
|||
use OCA\Social\Service\ConfigService;
|
||||
use OCA\Social\Service\MiscService;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\ILogger;
|
||||
use OCP\IURLGenerator;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -50,27 +50,12 @@ use OCP\IURLGenerator;
|
|||
* @package OCA\Social\Db
|
||||
*/
|
||||
class StreamDestRequest extends StreamDestRequestBuilder {
|
||||
|
||||
|
||||
use TStringTools;
|
||||
|
||||
private CacheActorService $cacheActorService;
|
||||
|
||||
/** @var CacheActorService */
|
||||
private $cacheActorService;
|
||||
|
||||
|
||||
/**
|
||||
* StreamDestRequest constructor.
|
||||
*
|
||||
* @param IDBConnection $connection
|
||||
* @param ILogger $logger
|
||||
* @param IURLGenerator $urlGenerator
|
||||
* @param CacheActorService $cacheActorService
|
||||
* @param ConfigService $configService
|
||||
* @param MiscService $miscService
|
||||
*/
|
||||
public function __construct(
|
||||
IDBConnection $connection, ILogger $logger, IURLGenerator $urlGenerator, CacheActorService $cacheActorService,
|
||||
IDBConnection $connection, LoggerInterface $logger, IURLGenerator $urlGenerator, CacheActorService $cacheActorService,
|
||||
ConfigService $configService, MiscService $miscService
|
||||
) {
|
||||
parent::__construct($connection, $logger, $urlGenerator, $configService, $miscService);
|
||||
|
@ -78,13 +63,6 @@ class StreamDestRequest extends StreamDestRequestBuilder {
|
|||
$this->cacheActorService = $cacheActorService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $streamId
|
||||
* @param string $actorId
|
||||
* @param string $type
|
||||
* @param string $subType
|
||||
*/
|
||||
public function create(string $streamId, string $actorId, string $type, string $subType = '') {
|
||||
$qb = $this->getStreamDestInsertSql();
|
||||
|
||||
|
|
|
@ -47,8 +47,8 @@ use OCA\Social\Service\ConfigService;
|
|||
use OCA\Social\Service\MiscService;
|
||||
use OCP\DB\QueryBuilder\IQueryBuilder;
|
||||
use OCP\IDBConnection;
|
||||
use OCP\ILogger;
|
||||
use OCP\IURLGenerator;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -57,28 +57,11 @@ use OCP\IURLGenerator;
|
|||
* @package OCA\Social\Db
|
||||
*/
|
||||
class StreamRequest extends StreamRequestBuilder {
|
||||
private StreamDestRequest $streamDestRequest;
|
||||
private StreamTagsRequest $streamTagsRequest;
|
||||
|
||||
|
||||
/** @var StreamDestRequest */
|
||||
private $streamDestRequest;
|
||||
|
||||
/** @var StreamTagsRequest */
|
||||
private $streamTagsRequest;
|
||||
|
||||
|
||||
/**
|
||||
* StreamRequest constructor.
|
||||
*
|
||||
* @param IDBConnection $connection
|
||||
* @param ILogger $logger
|
||||
* @param IURLGenerator $urlGenerator
|
||||
* @param StreamDestRequest $streamDestRequest
|
||||
* @param StreamTagsRequest $streamTagsRequest
|
||||
* @param ConfigService $configService
|
||||
* @param MiscService $miscService
|
||||
*/
|
||||
public function __construct(
|
||||
IDBConnection $connection, ILogger $logger, IURLGenerator $urlGenerator,
|
||||
IDBConnection $connection, LoggerInterface $logger, IURLGenerator $urlGenerator,
|
||||
StreamDestRequest $streamDestRequest, StreamTagsRequest $streamTagsRequest,
|
||||
ConfigService $configService, MiscService $miscService
|
||||
) {
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace OCA\Social\Migration;
|
|||
|
||||
|
||||
use Closure;
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
use OCP\DB\Types;
|
||||
use Exception;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\IDBConnection;
|
||||
|
@ -225,20 +225,20 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'summary', Type::TEXT,
|
||||
'summary', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'public_key', Type::TEXT,
|
||||
'public_key', Types::TEXT,
|
||||
[
|
||||
'notnull' => false
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'private_key', Type::TEXT,
|
||||
'private_key', Types::TEXT,
|
||||
[
|
||||
'notnull' => false
|
||||
]
|
||||
|
@ -542,7 +542,7 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'chunk', Type::SMALLINT,
|
||||
'chunk', Types::SMALLINT,
|
||||
[
|
||||
'default' => 1,
|
||||
'length' => 1,
|
||||
|
@ -565,7 +565,7 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'subtype', Type::STRING,
|
||||
'subtype', Types::STRING,
|
||||
[
|
||||
'notnull' => false,
|
||||
'length' => 31,
|
||||
|
@ -581,35 +581,35 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'to_array', Type::TEXT,
|
||||
'to_array', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'cc', Type::TEXT,
|
||||
'cc', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'bcc', Type::TEXT,
|
||||
'bcc', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'content', Type::TEXT,
|
||||
'content', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'summary', Type::TEXT,
|
||||
'summary', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
|
@ -686,42 +686,42 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'hashtags', Type::TEXT,
|
||||
'hashtags', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'details', Type::TEXT,
|
||||
'details', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'source', Type::TEXT,
|
||||
'source', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'instances', Type::TEXT,
|
||||
'instances', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'attachments', Type::TEXT,
|
||||
'attachments', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'cache', Type::TEXT,
|
||||
'cache', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
|
@ -902,28 +902,28 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'summary', Type::TEXT,
|
||||
'summary', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'public_key', Type::TEXT,
|
||||
'public_key', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'source', Type::TEXT,
|
||||
'source', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'details', Type::TEXT,
|
||||
'details', Types::TEXT,
|
||||
[
|
||||
'notnull' => false
|
||||
]
|
||||
|
@ -1012,7 +1012,7 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'resized_copy', Type::TEXT,
|
||||
'resized_copy', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
|
@ -1203,14 +1203,14 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'activity', Type::TEXT,
|
||||
'activity', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'instance', Type::TEXT,
|
||||
'instance', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'length' => 500,
|
||||
|
@ -1263,7 +1263,7 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
$table = $schema->createTable('social_3_stream_act');
|
||||
|
||||
$table->addColumn(
|
||||
'id', Type::INTEGER,
|
||||
'id', Types::INTEGER,
|
||||
[
|
||||
'autoincrement' => true,
|
||||
'notnull' => true,
|
||||
|
@ -1272,7 +1272,7 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
]
|
||||
);
|
||||
$table->addColumn(
|
||||
'chunk', Type::SMALLINT,
|
||||
'chunk', Types::SMALLINT,
|
||||
[
|
||||
'default' => 1,
|
||||
'length' => 1,
|
||||
|
@ -1315,7 +1315,7 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
$table->addColumn('boosted', 'boolean', ['default' => false]);
|
||||
$table->addColumn('replied', 'boolean', ['default' => false]);
|
||||
$table->addColumn(
|
||||
'values', Type::TEXT,
|
||||
'values', Types::TEXT,
|
||||
[
|
||||
'notnull' => false,
|
||||
'default' => ''
|
||||
|
@ -1338,7 +1338,7 @@ class Version0003Date20200611000001 extends SimpleMigrationStep {
|
|||
|
||||
$table = $schema->createTable('social_3_stream_dest');
|
||||
$table->addColumn(
|
||||
'chunk', Type::SMALLINT,
|
||||
'chunk', Types::SMALLINT,
|
||||
[
|
||||
'default' => 1,
|
||||
'length' => 1,
|
||||
|
|
|
@ -56,63 +56,22 @@ use OCP\IUserSession;
|
|||
* @package OCA\Social\Service
|
||||
*/
|
||||
class AccountService {
|
||||
|
||||
|
||||
const KEY_PAIR_LIFESPAN = 7;
|
||||
|
||||
|
||||
use TArrayTools;
|
||||
|
||||
private IUserManager $userManager;
|
||||
private IUserSession $userSession;
|
||||
private IAccountManager $accountManager;
|
||||
private ActorsRequest $actorsRequest;
|
||||
private FollowsRequest $followsRequest;
|
||||
private StreamRequest $streamRequest;
|
||||
private ActorService $actorService;
|
||||
private SignatureService $signatureService;
|
||||
private DocumentService $documentService;
|
||||
private ConfigService $configService;
|
||||
private MiscService $miscService;
|
||||
|
||||
/** @var IUserManager */
|
||||
private $userManager;
|
||||
|
||||
/** @var IUserSession */
|
||||
private $userSession;
|
||||
|
||||
/** @var IAccountManager */
|
||||
private $accountManager;
|
||||
|
||||
/** @var ActorsRequest */
|
||||
private $actorsRequest;
|
||||
|
||||
/** @var FollowsRequest */
|
||||
private $followsRequest;
|
||||
|
||||
/** @var StreamRequest */
|
||||
private $streamRequest;
|
||||
|
||||
/** @var ActorService */
|
||||
private $actorService;
|
||||
|
||||
/** @var SignatureService */
|
||||
private $signatureService;
|
||||
|
||||
/** @var DocumentService */
|
||||
private $documentService;
|
||||
|
||||
/** @var ConfigService */
|
||||
private $configService;
|
||||
|
||||
/** @var MiscService */
|
||||
private $miscService;
|
||||
|
||||
|
||||
/**
|
||||
* ActorService constructor.
|
||||
*
|
||||
* @param IUserManager $userManager
|
||||
* @param IUserSession $userSession
|
||||
* @param IAccountManager $accountManager
|
||||
* @param ActorsRequest $actorsRequest
|
||||
* @param FollowsRequest $followsRequest
|
||||
* @param StreamRequest $streamRequest
|
||||
* @param ActorService $actorService
|
||||
* @param DocumentService $documentService
|
||||
* @param SignatureService $signatureService
|
||||
* @param ConfigService $configService
|
||||
* @param MiscService $miscService
|
||||
*/
|
||||
public function __construct(
|
||||
IUserManager $userManager, IUserSession $userSession, IAccountManager $accountManager,
|
||||
ActorsRequest $actorsRequest,
|
||||
|
|
|
@ -33,11 +33,10 @@ namespace OCA\Social\Service;
|
|||
|
||||
use OC\User\NoUserException;
|
||||
use OCA\Social\AppInfo\Application;
|
||||
use OCP\ILogger;
|
||||
use OCP\IUser;
|
||||
use OCP\IUserManager;
|
||||
use OCP\Util;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Class MiscService
|
||||
|
@ -46,21 +45,11 @@ use OCP\Util;
|
|||
*/
|
||||
class MiscService {
|
||||
|
||||
|
||||
/** @var ILogger */
|
||||
private $logger;
|
||||
|
||||
/** @var IUserManager */
|
||||
private $userManager;
|
||||
private LoggerInterface $logger;
|
||||
private IUserManager $userManager;
|
||||
|
||||
|
||||
/**
|
||||
* MiscService constructor.
|
||||
*
|
||||
* @param ILogger $logger
|
||||
* @param IUserManager $userManager
|
||||
*/
|
||||
public function __construct(ILogger $logger, IUserManager $userManager) {
|
||||
public function __construct(LoggerInterface $logger, IUserManager $userManager) {
|
||||
$this->logger = $logger;
|
||||
$this->userManager = $userManager;
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue