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
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ class AccountTransformer extends Fractal\TransformerAbstract
{
$local = $profile->domain == null;
$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];
return [
'id' => (string) $profile->id,