1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-26 01:36:43 +00:00

Update AccountTransformer

This commit is contained in:
Daniel Supernault 2019-09-26 21:35:25 -06:00
parent 55ee29f301
commit 70f4b8607a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -11,7 +11,7 @@ class AccountTransformer extends Fractal\TransformerAbstract
{ {
$local = $profile->domain == null; $local = $profile->domain == null;
$is_admin = !$local ? false : $profile->user->is_admin; $is_admin = !$local ? false : $profile->user->is_admin;
$acct = $local ? $profile->username : substr($profile->username, 1); $acct = $local ? $profile->username + '@' + config('pixelfed.domain.app') : substr($profile->username, 1);
$username = $local ? $profile->username : explode('@', $acct)[0]; $username = $local ? $profile->username : explode('@', $acct)[0];
return [ return [
'id' => (string) $profile->id, 'id' => (string) $profile->id,