Update Profile model, add new AP methods

This commit is contained in:
Daniel Supernault 2018-09-15 18:37:11 -06:00
parent 8b08983c38
commit 63ca2a209d
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -205,4 +205,19 @@ class Profile extends Model
{
return $this->hasMany(Media::class, 'profile_id');
}
public function inboxUrl()
{
return $this->inbox_url ?? $this->permalink('/inbox');
}
public function outboxUrl()
{
return $this->outbox_url ?? $this->permalink('/outbox');
}
public function sharedInbox()
{
return $this->sharedInbox ?? $this->inboxUrl();
}
}