Update ProfileController, fix rss

This commit is contained in:
Daniel Supernault 2018-12-15 18:39:52 -07:00
parent 5a8b919f25
commit f3e216dfdc
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 2 additions and 2 deletions

View file

@ -136,7 +136,7 @@ class ProfileController extends Controller
return redirect($profile->url()); return redirect($profile->url());
} }
} }
$items = $profile->statuses()->whereIn('visibility',['public', 'unlisted'])->orderBy('created_at', 'desc')->take(10)->get(); $items = $profile->statuses()->whereHas('media')->whereIn('visibility',['public', 'unlisted'])->orderBy('created_at', 'desc')->take(10)->get();
return response()->view('atom.user', compact('profile', 'items')) return response()->view('atom.user', compact('profile', 'items'))
->header('Content-Type', 'application/atom+xml'); ->header('Content-Type', 'application/atom+xml');
} }

View file

@ -28,7 +28,7 @@
<entry> <entry>
<title>{{ $item->caption }}</title> <title>{{ $item->caption }}</title>
<link rel="alternate" href="{{ $item->url() }}" /> <link rel="alternate" href="{{ $item->url() }}" />
<id>{{ url($item->id) }}</id> <id>{{ $item->url() }}</id>
<author> <author>
<name> <![CDATA[{{ $item->profile->username }}]]></name> <name> <![CDATA[{{ $item->profile->username }}]]></name>
</author> </author>