Update atom view, fix atom feed bug

This commit is contained in:
Daniel Supernault 2023-05-19 03:38:11 -06:00
parent ae0d5d2d40
commit 63b72c429c
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -6,13 +6,18 @@
<id>{{$permalink}}</id> <id>{{$permalink}}</id>
<title>{{$profile['username']}} on Pixelfed</title> <title>{{$profile['username']}} on Pixelfed</title>
<subtitle type="html">{{$profile['note']}}</subtitle> <subtitle type="html">{{$profile['note']}}</subtitle>
<updated>{{$items[0]['created_at']}}</updated> @if($items && count($items))
<updated>{{$items[0]['created_at']}}</updated>
@endif
<author> <author>
<name>{{$profile['username']}}</name> <name>{{$profile['username']}}</name>
<uri>{{$profile['url']}}</uri> <uri>{{$profile['url']}}</uri>
</author> </author>
<link rel="alternate" type="text/html" href="{{$profile['url']}}" /> <link rel="alternate" type="text/html" href="{{$profile['url']}}" />
<link rel="self" type="application/atom+xml" href="{{$permalink}}" /> <link rel="self" type="application/atom+xml" href="{{$permalink}}" />
@if($items && count($items))
@foreach($items as $item) @foreach($items as $item)
<entry> <entry>
<id>{{ $item['url'] }}</id> <id>{{ $item['url'] }}</id>
@ -35,4 +40,7 @@
<media:content url="{{ $item['media_attachments'][0]['url'] }}" type="{{ $item['media_attachments'][0]['mime'] }}" medium="image" /> <media:content url="{{ $item['media_attachments'][0]['url'] }}" type="{{ $item['media_attachments'][0]['mime'] }}" medium="image" />
</entry> </entry>
@endforeach @endforeach
@endif
</feed> </feed>