mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 17:14:26 +02:00
Quote for notifications
This commit is contained in:
parent
b6fcfebd56
commit
30093fd2ec
3 changed files with 6 additions and 5 deletions
|
@ -47,11 +47,12 @@ class Notification extends BaseFactory
|
|||
|
||||
/**
|
||||
* @param Notifications\Entity\Notification $Notification
|
||||
* @param bool $display_quote Display quoted posts
|
||||
*
|
||||
* @return MstdnNotification
|
||||
* @throws UnexpectedNotificationTypeException
|
||||
*/
|
||||
public function createFromNotification(Notifications\Entity\Notification $Notification): MstdnNotification
|
||||
public function createFromNotification(Notifications\Entity\Notification $Notification, bool $display_quotes): MstdnNotification
|
||||
{
|
||||
$type = self::getType($Notification);
|
||||
if (empty($type)) {
|
||||
|
@ -62,7 +63,7 @@ class Notification extends BaseFactory
|
|||
|
||||
if ($Notification->targetUriId) {
|
||||
try {
|
||||
$status = $this->mstdnStatusFactory->createFromUriId($Notification->targetUriId, $Notification->uid);
|
||||
$status = $this->mstdnStatusFactory->createFromUriId($Notification->targetUriId, $Notification->uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
$status = null;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ class Status extends BaseFactory
|
|||
* @throws HTTPException\InternalServerErrorException
|
||||
* @throws ImagickException|HTTPException\NotFoundException
|
||||
*/
|
||||
public function createFromUriId(int $uriId, int $uid = 0, bool $display_quote = false, bool $reblog = true, bool $in_reply_status = true): \Friendica\Object\Api\Mastodon\Status
|
||||
public function createFromUriId(int $uriId, int $uid = 0, bool $display_quote, bool $reblog = true, bool $in_reply_status = true): \Friendica\Object\Api\Mastodon\Status
|
||||
{
|
||||
$fields = ['uri-id', 'uid', 'author-id', 'causer-id', 'author-uri-id', 'author-link', 'causer-uri-id', 'post-reason', 'starred', 'app', 'title', 'body', 'raw-body', 'content-warning', 'question-id',
|
||||
'created', 'network', 'thr-parent-id', 'parent-author-id', 'language', 'uri', 'plink', 'private', 'vid', 'gravity', 'featured', 'has-media', 'quote-uri-id'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue