Apply the same fix to replies and reposts
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled

This commit is contained in:
Jonny Barnes 2024-11-30 15:31:17 +00:00
parent 1d59d57c2e
commit 84383ecd31
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8

View file

@ -13,7 +13,7 @@
@if (array_key_exists('photo', $reply['author']['properties']))
<img src="{{ $reply['author']['properties']['photo'][0] }}" alt="" class="photo u-photo logo">
@endif
<span class="fn">{{ $reply['author']['properties']['name'][0] }}</span>
<span class="fn">{{ $reply['author']['properties']['name'][0] ?? $reply['author']['properties']['nickname'][0] ?? 'unknown' }}</span>
</a>
@else
Unknown author
@ -47,7 +47,7 @@
return ($webmention->type == 'repost-of');
}) as $repost)
<a href="{{ $repost['source'] }}">
<img src="{{ $repost['author']['properties']['photo'][0] }}" alt="{{ $repost['author']['properties']['name'][0] }} reposted this at {{ $repost['published'] }}">
<img src="{{ $repost['author']['properties']['photo'][0] }}" alt="{{ $repost['author']['properties']['name'][0] ?? $repost['author']['properties']['nickname'][0] ?? 'unknown' }} reposted this at {{ $repost['published'] }}">
</a>
@endforeach
</div>