Gefällt mir im Feed, Suche links in der App-Kopfzeile (0.58.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 13m31s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 13m53s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 13m53s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 13m44s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 12m3s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 12m20s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m35s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m1s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 12m13s
CI / Build-Artefakte aktuell (pull_request) Successful in 4m56s
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 13m31s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 13m53s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 13m53s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 13m44s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 12m3s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 12m20s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 10m35s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 1m1s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 12m13s
CI / Build-Artefakte aktuell (pull_request) Successful in 4m56s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
086878c733
commit
b2599f7bc3
141 changed files with 467 additions and 379 deletions
|
|
@ -22,6 +22,7 @@ use Throwable;
|
|||
* 'actor' => Feed::person($post->author), 'action' => 'hat eine Neuigkeit veröffentlicht',
|
||||
* 'badge' => $post->category?->name, 'title' => $post->title, 'text' => $post->teaser,
|
||||
* 'image_url' => …, 'url' => …, 'stats' => ['likes' => 3, 'comments' => 1],
|
||||
* 'like' => ['liked' => false, 'url' => '/neuigkeiten/…/herz'], // optional
|
||||
* ]);
|
||||
* });
|
||||
*
|
||||
|
|
@ -125,6 +126,13 @@ class Feed
|
|||
'url' => (string) $item['url'],
|
||||
'stats' => is_array($item['stats'] ?? null) ? $item['stats'] : null,
|
||||
'cta' => is_array($item['cta'] ?? null) && filled($item['cta']['label'] ?? null) ? $item['cta'] : null,
|
||||
// Gefällt mir direkt im Feed: toggle = POST setzt, DELETE nimmt zurück (Antwort JSON);
|
||||
// reaction = POST {emoji} bzw. {emoji: null}
|
||||
'like' => is_array($item['like'] ?? null) && filled($item['like']['url'] ?? null) ? [
|
||||
'liked' => (bool) ($item['like']['liked'] ?? false),
|
||||
'url' => (string) $item['like']['url'],
|
||||
'mode' => ($item['like']['mode'] ?? 'toggle') === 'reaction' ? 'reaction' : 'toggle',
|
||||
] : null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue