mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 08:14:25 +02:00
Merge branch 'develop' into blocks-status-fix
This commit is contained in:
commit
7224c0fc38
32 changed files with 952 additions and 114 deletions
|
@ -59,12 +59,18 @@ class Status extends BaseFactory
|
|||
/** @var ContentItem */
|
||||
private $contentItem;
|
||||
|
||||
public function __construct(LoggerInterface $logger, Database $dba,
|
||||
Account $mstdnAccountFactory, Mention $mstdnMentionFactory,
|
||||
Tag $mstdnTagFactory, Card $mstdnCardFactory,
|
||||
Attachment $mstdnAttachementFactory, Error $mstdnErrorFactory,
|
||||
Poll $mstdnPollFactory, ContentItem $contentItem)
|
||||
{
|
||||
public function __construct(
|
||||
LoggerInterface $logger,
|
||||
Database $dba,
|
||||
Account $mstdnAccountFactory,
|
||||
Mention $mstdnMentionFactory,
|
||||
Tag $mstdnTagFactory,
|
||||
Card $mstdnCardFactory,
|
||||
Attachment $mstdnAttachementFactory,
|
||||
Error $mstdnErrorFactory,
|
||||
Poll $mstdnPollFactory,
|
||||
ContentItem $contentItem
|
||||
) {
|
||||
parent::__construct($logger);
|
||||
$this->dba = $dba;
|
||||
$this->mstdnAccountFactory = $mstdnAccountFactory;
|
||||
|
@ -144,10 +150,18 @@ class Status extends BaseFactory
|
|||
'deleted' => false
|
||||
]);
|
||||
|
||||
$count_dislike = Post::countPosts([
|
||||
'thr-parent-id' => $uriId,
|
||||
'gravity' => Item::GRAVITY_ACTIVITY,
|
||||
'vid' => Verb::getID(Activity::DISLIKE),
|
||||
'deleted' => false
|
||||
]);
|
||||
|
||||
$counts = new \Friendica\Object\Api\Mastodon\Status\Counts(
|
||||
Post::countPosts(['thr-parent-id' => $uriId, 'gravity' => Item::GRAVITY_COMMENT, 'deleted' => false], []),
|
||||
$count_announce,
|
||||
$count_like
|
||||
$count_like,
|
||||
$count_dislike
|
||||
);
|
||||
|
||||
$origin_like = ($count_like == 0) ? false : Post::exists([
|
||||
|
@ -323,7 +337,7 @@ class Status extends BaseFactory
|
|||
|
||||
$replies = $this->dba->count('mail', ['thr-parent-id' => $item['uri-id'], 'reply' => true]);
|
||||
|
||||
$counts = new \Friendica\Object\Api\Mastodon\Status\Counts($replies, 0, 0);
|
||||
$counts = new \Friendica\Object\Api\Mastodon\Status\Counts($replies, 0, 0, 0);
|
||||
|
||||
$userAttributes = new \Friendica\Object\Api\Mastodon\Status\UserAttributes(false, false, false, false, false);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue