diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2020-06-12 11:35:33 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2020-06-12 11:35:49 -0100 |
commit | 09a6aac9375b580cf9ee5f6407b5c1b78fc04959 (patch) | |
tree | a8552b308a6e49f626ac712e8730ba4552bf2ee1 | |
parent | bcf76667f7243d2c6078a7c9dbb7429f2b201963 (diff) |
new database
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
22 files changed, 488 insertions, 2140 deletions
diff --git a/appinfo/info.xml b/appinfo/info.xml index 6eeb233f..4bda7b49 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -18,7 +18,7 @@ **🕸 Open standards:** We use the established ActivityPub standard! ]]></description> - <version>0.2.101</version> + <version>0.3</version> <licence>agpl</licence> <author mail="maxence@artificial-owl.com">Maxence Lange</author> <author mail="jus@bitgrid.net">Julius Härtl</author> @@ -32,7 +32,7 @@ <repository type="git">https://github.com/nextcloud/social.git</repository> <screenshot>https://raw.githubusercontent.com/nextcloud/social/master/img/screenshot.png</screenshot> <dependencies> - <nextcloud min-version="15" max-version="17"/> + <nextcloud min-version="15" max-version="19"/> <database>pgsql</database> <database>sqlite</database> <database>mysql</database> diff --git a/composer.lock b/composer.lock index 0836bdf8..758e0955 100644 --- a/composer.lock +++ b/composer.lock @@ -12,12 +12,12 @@ "source": { "type": "git", "url": "https://github.com/daita/my-small-php-tools.git", - "reference": "2252b8e425e68331e70d4cfad412274af12e5c6f" + "reference": "d8778803612af20699c7efb0637bfe62478e596c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/2252b8e425e68331e70d4cfad412274af12e5c6f", - "reference": "2252b8e425e68331e70d4cfad412274af12e5c6f", + "url": "https://api.github.com/repos/daita/my-small-php-tools/zipball/d8778803612af20699c7efb0637bfe62478e596c", + "reference": "d8778803612af20699c7efb0637bfe62478e596c", "shasum": "" }, "require": { @@ -40,7 +40,7 @@ } ], "description": "My small PHP Tools", - "time": "2019-10-03T11:59:56+00:00" + "time": "2020-03-18T23:09:45+00:00" }, { "name": "friendica/json-ld", @@ -448,16 +448,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "4.3.2", + "version": "4.3.4", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", - "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", "shasum": "" }, "require": { @@ -469,6 +469,7 @@ "require-dev": { "doctrine/instantiator": "^1.0.5", "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", "phpunit/phpunit": "^6.4" }, "type": "library", @@ -495,7 +496,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2019-09-12T14:27:41+00:00" + "time": "2019-12-28T18:55:12+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -544,33 +545,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.9.0", + "version": "v1.10.3", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" + "reference": "451c3cd1418cf640de218914901e51b064abb093" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", - "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", - "sebastian/comparator": "^1.1|^2.0|^3.0", - "sebastian/recursion-context": "^1.0|^2.0|^3.0" + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" }, "require-dev": { - "phpspec/phpspec": "^2.5|^3.2", + "phpspec/phpspec": "^2.5 || ^3.2", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8.x-dev" + "dev-master": "1.10.x-dev" } }, "autoload": { @@ -603,7 +604,7 @@ "spy", "stub" ], - "time": "2019-10-03T11:07:50+00:00" + "time": "2020-03-05T15:02:03+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1559,16 +1560,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.12.0", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", - "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", "shasum": "" }, "require": { @@ -1580,7 +1581,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.12-dev" + "dev-master": "1.17-dev" } }, "autoload": { @@ -1613,7 +1614,7 @@ "polyfill", "portable" ], - "time": "2019-08-06T08:03:45+00:00" + "time": "2020-05-12T16:14:59+00:00" }, { "name": "theseer/tokenizer", @@ -1657,31 +1658,29 @@ }, { "name": "webmozart/assert", - "version": "1.5.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", - "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", + "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0", "symfony/polyfill-ctype": "^1.8" }, + "conflict": { + "vimeo/psalm": "<3.9.1" + }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -1703,7 +1702,7 @@ "check", "validate" ], - "time": "2019-08-24T08:43:50+00:00" + "time": "2020-04-18T12:12:48+00:00" } ], "aliases": [], @@ -307,7 +307,7 @@ class AP { case Announce::TYPE: $item = new Announce(); - $item->setHiddenOnTimeline(true); + $item->setFilterDuplicate(true); break; case Block::TYPE: diff --git a/lib/Command/CheckInstall.php b/lib/Command/CheckInstall.php index 4a2cd6a8..c01d85fb 100644 --- a/lib/Command/CheckInstall.php +++ b/lib/Command/CheckInstall.php @@ -177,7 +177,8 @@ class CheckInstall extends Base { throw new Exception('unknown user'); } - $wrapper = $this->pushService->testOnAccount($userId); + // push was not implemented on 18 +// $wrapper = $this->pushService->testOnAccount($userId); $output->writeln(json_encode($wrapper, JSON_PRETTY_PRINT)); diff --git a/lib/Db/ActionsRequest.php b/lib/Db/ActionsRequest.php index 979164ea..3ad0c125 100644 --- a/lib/Db/ActionsRequest.php +++ b/lib/Db/ActionsRequest.php @@ -60,8 +60,10 @@ class ActionsRequest extends ActionsRequestBuilder { $qb = $this->getActionsInsertSql(); $qb->setValue('id', $qb->createNamedParameter($like->getId())) ->setValue('actor_id', $qb->createNamedParameter($like->getActorId())) + ->setValue('actor_id_prim', $qb->createNamedParameter($qb->prim($like->getActorId()))) ->setValue('type', $qb->createNamedParameter($like->getType())) - ->setValue('object_id', $qb->createNamedParameter($like->getObjectId())); + ->setValue('object_id', $qb->createNamedParameter($like->getObjectId())) + ->setValue('object_id_prim', $qb->createNamedParameter($qb->prim($like->getObjectId()))); try { $qb->setValue( @@ -88,18 +90,11 @@ class ActionsRequest extends ActionsRequestBuilder { */ public function getAction(string $actorId, string $objectId, string $type): ACore { $qb = $this->getActionsSelectSql(); - $this->limitToActorId($qb, $actorId); - $this->limitToObjectId($qb, $objectId); - $this->limitToType($qb, $type); + $qb->limitToActorIdPrim($qb->prim($actorId)); + $qb->limitToObjectIdPrim($qb->prim($objectId)); + $qb->limitToType($type); - $cursor = $qb->execute(); - $data = $cursor->fetch(); - $cursor->closeCursor(); - if ($data === false) { - throw new ActionDoesNotExistException(); - } - - return $this->parseActionsSelectSql($data); + return $this->getActionFromRequest($qb); } @@ -111,18 +106,12 @@ class ActionsRequest extends ActionsRequestBuilder { */ public function getActionFromItem(ACore $item): ACore { $qb = $this->getActionsSelectSql(); - $this->limitToActorId($qb, $item->getActorId()); - $this->limitToObjectId($qb, $item->getObjectId()); - $this->limitToType($qb, $item->getType()); - $cursor = $qb->execute(); - $data = $cursor->fetch(); - $cursor->closeCursor(); - if ($data === false) { - throw new ActionDoesNotExistException(); - } + $qb->limitToActorIdPrim($qb->prim($item->getActorId())); + $qb->limitToObjectIdPrim($qb->prim($item->getObjectId())); + $qb->limitToType($item->getType()); - return $this->parseActionsSelectSql($data); + return $this->getActionFromRequest($qb); } @@ -134,8 +123,8 @@ class ActionsRequest extends ActionsRequestBuilder { */ public function countActions(string $objectId, string $type): int { $qb = $this->countActionsSelectSql(); - $this->limitToObjectId($qb, $objectId); - $this->limitToType($qb, $type); + $qb->limitToObjectIdPrim($qb->prim($objectId)); + $qb->limitToType($type); $cursor = $qb->execute(); $data = $cursor->fetch(); @@ -152,17 +141,10 @@ class ActionsRequest extends ActionsRequestBuilder { */ public function getByObjectId(string $objectId): array { $qb = $this->getActionsSelectSql(); - $this->limitToObjectId($qb, $objectId); + $qb->limitToObjectIdPrim($qb->prim($objectId)); $this->leftJoinCacheActors($qb, 'actor_id'); - $likes = []; - $cursor = $qb->execute(); - while ($data = $cursor->fetch()) { - $likes[] = $this->parseActionsSelectSql($data); - } - $cursor->closeCursor(); - - return $likes; + return $this->getActionsFromRequest($qb); } @@ -178,15 +160,15 @@ class ActionsRequest extends ActionsRequestBuilder { } - /** - * @param string $objectId - */ - public function deleteLikes(string $objectId) { - $qb = $this->getActionsDeleteSql(); - $this->limitToObjectId($qb, $objectId); - - $qb->execute(); - } +// /** +// * @param string $objectId +// */ +// public function deleteLikes(string $objectId) { +// $qb = $this->getActionsDeleteSql(); +// $this->limitToObjectId($qb, $objectId); +// +// $qb->execute(); +// } } diff --git a/lib/Db/ActionsRequestBuilder.php b/lib/Db/ActionsRequestBuilder.php index a72ae102..5bf74e8f 100644 --- a/lib/Db/ActionsRequestBuilder.php +++ b/lib/Db/ActionsRequestBuilder.php @@ -31,10 +31,11 @@ declare(strict_types=1); namespace OCA\Social\Db; +use daita\MySmallPhpTools\Exceptions\RowNotFoundException; use daita\MySmallPhpTools\Traits\TArrayTools; +use OCA\Social\Exceptions\ActionDoesNotExistException; use OCA\Social\Exceptions\InvalidResourceException; use OCA\Social\Model\ActivityPub\ACore; -use OCP\DB\QueryBuilder\IQueryBuilder; /** @@ -51,10 +52,10 @@ class ActionsRequestBuilder extends CoreRequestBuilder { /** * Base of the Sql Insert request * - * @return IQueryBuilder + * @return SocialQueryBuilder */ - protected function getActionsInsertSql(): IQueryBuilder { - $qb = $this->dbConnection->getQueryBuilder(); + protected function getActionsInsertSql(): SocialQueryBuilder { + $qb = $this->getQueryBuilder(); $qb->insert(self::TABLE_ACTIONS); return $qb; @@ -64,10 +65,10 @@ class ActionsRequestBuilder extends CoreRequestBuilder { /** * Base of the Sql Update request * - * @return IQueryBuilder + * @return SocialQueryBuilder */ - protected function getActionsUpdateSql(): IQueryBuilder { - $qb = $this->dbConnection->getQueryBuilder(); + protected function getActionsUpdateSql(): SocialQueryBuilder { + $qb = $this->getQueryBuilder(); $qb->update(self::TABLE_ACTIONS); return $qb; @@ -77,10 +78,10 @@ class ActionsRequestBuilder extends CoreRequestBuilder { /** * Base of the Sql Select request for Shares * - * @return IQueryBuilder + * @return SocialQueryBuilder */ - protected function getActionsSelectSql(): IQueryBuilder { - $qb = $this->dbConnection->getQueryBuilder(); + protected function getActionsSelectSql(): SocialQueryBuilder { + $qb = $this->getQueryBuilder(); /** @noinspection PhpMethodParametersCountMismatchInspection */ $qb->select('a.id', 'a.type', 'a.actor_id', 'a.object_id', 'a.creation') @@ -95,10 +96,10 @@ class ActionsRequestBuilder extends CoreRequestBuilder { /** * Base of the Sql Select request for Shares * - * @return IQueryBuilder + * @return SocialQueryBuilder */ - protected function countActionsSelectSql(): IQueryBuilder { - $qb = $this->dbConnection->getQueryBuilder(); + protected function countActionsSelectSql(): SocialQueryBuilder { + $qb = $this->getQueryBuilder(); $qb->selectAlias($qb->createFunction('COUNT(*)'), 'count') ->from(self::TABLE_ACTIONS, 'a'); @@ -111,10 +112,10 @@ class ActionsRequestBuilder extends CoreRequestBuilder { /** * Base of the Sql Delete request * - * @return IQueryBuilder + * @return SocialQueryBuilder */ - protected function getActionsDeleteSql(): IQueryBuilder { - $qb = $this->dbConnection->getQueryBuilder(); + protected function getActionsDeleteSql(): SocialQueryBuilder { + $qb = $this->getQueryBuilder(); $qb->delete(self::TABLE_ACTIONS); return $qb; @@ -122,6 +123,37 @@ class ActionsRequestBuilder extends CoreRequestBuilder { /** + * @param SocialQueryBuilder $qb + * + * @return ACore + * @throws ActionDoesNotExistException + */ + protected function getActionFromRequest(SocialQueryBuilder $qb): ACore { + /** @var ACore $result */ + try { + $result = $qb->getRow([$this, 'parseActionsSelectSql']); + } catch (RowNotFoundException $e) { + throw new ActionDoesNotExistException($e->getMessage()); + } + + return $result; + } + + + /** + * @param SocialQueryBuilder $qb + * + * @return ACore[] + */ + public function getActionsFromRequest(SocialQueryBuilder $qb): array { + /** @var ACore[] $result */ + $result = $qb->getRows([$this, 'parseActionsSelectSql']); + + return $result; + } + + + /** * @param array $data * * @return ACore diff --git a/lib/Db/CoreRequestBuilder.php b/lib/Db/CoreRequestBuilder.php index 0c6f3592..622805eb 100644 --- a/lib/Db/CoreRequestBuilder.php +++ b/lib/Db/CoreRequestBuilder.php @@ -60,21 +60,21 @@ use OCP\ILogger; class CoreRequestBuilder { - const TABLE_REQUEST_QUEUE = 'social_a2_req_queue'; + const TABLE_REQUEST_QUEUE = 'social_3_req_queue'; - const TABLE_ACTORS = 'social_a2_actors'; - const TABLE_STREAM = 'social_a2_stream'; - const TABLE_STREAM_DEST = 'social_a2_stream_dest'; - const TABLE_STREAM_TAGS = 'social_a2_stream_tags'; - const TABLE_STREAM_QUEUE = 'social_a2_stream_queue'; - const TABLE_STREAM_ACTIONS = 'social_a2_stream_act'; + const TABLE_ACTORS = 'social_3_actor'; + const TABLE_STREAM = 'social_3_stream'; + const TABLE_STREAM_DEST = 'social_3_stream_dest'; + const TABLE_STREAM_TAGS = 'social_3_stream_tag'; + const TABLE_STREAM_QUEUE = 'social_3_stream_queue'; + const TABLE_STREAM_ACTIONS = 'social_3_stream_act'; - const TABLE_HASHTAGS = 'social_a2_hashtags'; - const TABLE_FOLLOWS = 'social_a2_follows'; - const TABLE_ACTIONS = 'social_a2_actions'; + const TABLE_HASHTAGS = 'social_3_hashtag'; + const TABLE_FOLLOWS = 'social_3_follow'; + const TABLE_ACTIONS = 'social_3_action'; - const TABLE_CACHE_ACTORS = 'social_a2_cache_actors'; - const TABLE_CACHE_DOCUMENTS = 'social_a2_cache_docum'; + const TABLE_CACHE_ACTORS = 'social_3_cache_actor'; + const TABLE_CACHE_DOCUMENTS = 'social_3_cache_doc'; /** @var array */ private $tables = [ @@ -104,7 +104,6 @@ class CoreRequestBuilder { /** @var MiscService */ protected $miscService; - /** @var Person */ protected $viewer = null; @@ -192,9 +191,11 @@ class CoreRequestBuilder { /** * Limit the request to the Id - * @deprecated + * * @param IQueryBuilder $qb * @param int $id + * + * @deprecated */ protected function limitToId(IQueryBuilder &$qb, int $id) { $this->limitToDBFieldInt($qb, 'id', $id); @@ -203,10 +204,12 @@ class CoreRequestBuilder { /** * Limit the request to the Id (string) - * @deprecated * * @param IQueryBuilder $qb * @param string $id + * + * @deprecated + * */ protected function limitToIdString(IQueryBuilder &$qb, string $id) { $this->limitToDBField($qb, 'id', $id, false); @@ -215,10 +218,12 @@ class CoreRequestBuilder { /** * Limit the request to the UserId - * @deprecated * * @param IQueryBuilder $qb * @param string $userId + * + * @deprecated + * */ protected function limitToUserId(IQueryBuilder &$qb, string $userId) { $this->limitToDBField($qb, 'user_id', $userId, false); @@ -238,9 +243,11 @@ class CoreRequestBuilder { /** * Limit the request to the Id (string) - * @deprecated + * * @param IQueryBuilder $qb * @param string $id + * + * @deprecated */ protected function limitToInReplyTo(IQueryBuilder &$qb, string $id) { $this->limitToDBField($qb, 'in_reply_to', $id, false); @@ -774,9 +781,10 @@ class CoreRequestBuilder { /** - * @deprecated * @param IQueryBuilder $qb * @param string $alias + * + * @deprecated */ protected function selectCacheActors(IQueryBuilder &$qb, string $alias = 'ca') { if ($qb->getType() !== QueryBuilder::SELECT) { diff --git a/lib/Db/SocialFiltersQueryBuilder.php b/lib/Db/SocialFiltersQueryBuilder.php index d0aca550..a9f323c1 100644 --- a/lib/Db/SocialFiltersQueryBuilder.php +++ b/lib/Db/SocialFiltersQueryBuilder.php @@ -55,7 +55,7 @@ class SocialFiltersQueryBuilder extends SocialLimitsQueryBuilder { $expr = $this->expr(); $filter = $expr->orX(); - $filter->add($this->exprLimitToDBFieldInt('hidden_on_timeline', 0, 's')); + $filter->add($this->exprLimitToDBFieldInt('filter_duplicate', 0, 's')); $follower = $expr->andX(); $follower->add($this->exprLimitToDBField('attributed_to_prim', $this->prim($viewer->getId()), false)); diff --git a/lib/Db/SocialLimitsQueryBuilder.php b/lib/Db/SocialLimitsQueryBuilder.php index 1af01eed..a82cddb3 100644 --- a/lib/Db/SocialLimitsQueryBuilder.php +++ b/lib/Db/SocialLimitsQueryBuilder.php @@ -165,6 +165,17 @@ class SocialLimitsQueryBuilder extends SocialCrossQueryBuilder { /** + * Limit the request to the ActorId + * + * @param string $actorId + * @param string $alias + */ + public function limitToActorIdPrim(string $actorId, string $alias = '') { + $this->limitToDBField('actor_id', $actorId, false, $alias); + } + + + /** * Limit the request to the FollowId * * @param string $followId @@ -196,6 +207,17 @@ class SocialLimitsQueryBuilder extends SocialCrossQueryBuilder { /** + * Limit the request to the ActorId + * + * @param string $actorId + * @param string $alias + */ + public function limitToObjectIdPrim(string $actorId, string $alias = '') { + $this->limitToDBField('object_id_prim', $actorId, false, $alias); + } + + + /** * Limit the request to the account * * @param string $account diff --git a/lib/Db/StreamRequest.php b/lib/Db/StreamRequest.php index 9a2d9f0f..db1480f4 100644 --- a/lib/Db/StreamRequest.php +++ b/lib/Db/StreamRequest.php @@ -666,6 +666,7 @@ class StreamRequest extends StreamRequestBuilder { ->setValue('attributed_to', $qb->createNamedParameter($attributedTo)) ->setValue('attributed_to_prim', $qb->createNamedParameter($qb->prim($attributedTo))) ->setValue('in_reply_to', $qb->createNamedParameter($stream->getInReplyTo())) + ->setValue('in_reply_to_prim', $qb->createNamedParameter($qb->prim($stream->getInReplyTo()))) ->setValue('source', $qb->createNamedParameter($stream->getSource())) ->setValue('activity_id', $qb->createNamedParameter($stream->getActivityId())) ->setValue('object_id', $qb->createNamedParameter($stream->getObjectId())) @@ -673,8 +674,8 @@ class StreamRequest extends StreamRequestBuilder { ->setValue('details', $qb->createNamedParameter(json_encode($stream->getDetailsAll()))) ->setValue('cache', $qb->createNamedParameter($cache)) ->setValue( - 'hidden_on_timeline', - $qb->createNamedParameter(($stream->isHiddenOnTimeline()) ? '1' : '0') + 'filter_duplicate', + $qb->createNamedParameter(($stream->isFilterDuplicate()) ? '1' : '0') ) ->setValue( 'instances', $qb->createNamedParameter( diff --git a/lib/Db/StreamRequestBuilder.php b/lib/Db/StreamRequestBuilder.php index f13d4403..50046149 100644 --- a/lib/Db/StreamRequestBuilder.php +++ b/lib/Db/StreamRequestBuilder.php @@ -95,7 +95,7 @@ class StreamRequestBuilder extends CoreRequestBuilder { 's.type', 's.subtype', 's.to', 's.to_array', 's.cc', 's.bcc', 's.content', 's.summary', 's.attachments', 's.published', 's.published_time', 's.cache', 's.object_id', 's.attributed_to', 's.in_reply_to', 's.source', 's.local', - 's.instances', 's.creation', 's.hidden_on_timeline', 's.details', 's.hashtags' + 's.instances', 's.creation', 's.filter_duplicate', 's.details', 's.hashtags' ) ->from(self::TABLE_STREAM, 's'); diff --git a/lib/Migration/Version0002Date20190622000001.php b/lib/Migration/Version0002Date20190622000001.php deleted file mode 100644 index 7e8aaa8b..00000000 --- a/lib/Migration/Version0002Date20190622000001.php +++ /dev/null @@ -1,404 +0,0 @@ -<?php -declare(strict_types=1); - - -/** - * Nextcloud - Social Support - * - * This file is licensed under the Affero General Public License version 3 or< |