Add avatar to AP profile

pull/371/head
Daniel Supernault 2018-08-13 19:31:18 -06:00
rodzic a842c54f22
commit c14314d70f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
2 zmienionych plików z 8 dodań i 13 usunięć

Wyświetl plik

@ -20,14 +20,10 @@ class ProfileController extends Controller
$user = Profile::whereUsername($username)->firstOrFail();
$settings = User::whereUsername($username)->firstOrFail()->settings;
$mimes = [
'application/activity+json',
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
];
if(str_contains($request->header('accept'), $mimes) && config('pixelfed.activitypub_enabled')) {
if($request->wantsJson() && config('pixelfed.activitypub_enabled')) {
return $this->showActivityPub($request, $user);
}
if($user->is_private == true) {
$can_access = $this->privateProfileCheck($user);
if($can_access !== true) {
@ -53,12 +49,7 @@ class ProfileController extends Controller
$user = Profile::whereUsername($username)->firstOrFail();
$settings = User::whereUsername($username)->firstOrFail()->settings;
$mimes = [
'application/activity+json',
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
];
if(str_contains($request->header('accept'), $mimes) && config('pixelfed.activitypub_enabled')) {
if($request->wantsJson() && config('pixelfed.activitypub_enabled')) {
return $this->showActivityPub($request, $user);
}

Wyświetl plik

@ -41,7 +41,11 @@ class ProfileTransformer extends Fractal\TransformerAbstract
'endpoints' => [
'sharedInbox' => config('routes.api.sharedInbox')
],
'icon' => [
'type' => 'Image',
'mediaType' => 'image/jpeg',
'url' => $profile->avatarUrl()
]
];
}