mirror of
https://github.com/friendica/friendica
synced 2025-04-27 12:30:11 +00:00
Improved cards handling, simplified Bearer handling
This commit is contained in:
parent
7d8c152aaf
commit
bade0a2345
7 changed files with 120 additions and 29 deletions
|
@ -39,9 +39,17 @@ class Card extends BaseDataTransferObject
|
|||
/** @var string */
|
||||
protected $type;
|
||||
/** @var string */
|
||||
protected $author_name;
|
||||
/** @var string */
|
||||
protected $author_url;
|
||||
/** @var string */
|
||||
protected $provider_name;
|
||||
/** @var string */
|
||||
protected $provider_url;
|
||||
/** @var int */
|
||||
protected $width;
|
||||
/** @var int */
|
||||
protected $height;
|
||||
/** @var string */
|
||||
protected $image;
|
||||
|
||||
|
@ -57,9 +65,13 @@ class Card extends BaseDataTransferObject
|
|||
$this->title = $attachment['title'] ?? '';
|
||||
$this->description = $attachment['description'] ?? '';
|
||||
$this->type = $attachment['type'] ?? '';
|
||||
$this->image = $attachment['image'] ?? '';
|
||||
$this->author_name = $attachment['author_name'] ?? '';
|
||||
$this->author_url = $attachment['author_url'] ?? '';
|
||||
$this->provider_name = $attachment['provider_name'] ?? '';
|
||||
$this->provider_url = $attachment['provider_url'] ?? '';
|
||||
$this->width = $attachment['width'] ?? 0;
|
||||
$this->height = $attachment['height'] ?? 0;
|
||||
$this->image = $attachment['image'] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -134,7 +134,7 @@ class Status extends BaseDataTransferObject
|
|||
$this->mentions = $mentions;
|
||||
$this->tags = $tags;
|
||||
$this->emojis = [];
|
||||
//$this->card = $card;
|
||||
$this->card = $card->toArray() ?: null;
|
||||
$this->poll = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue