From 63ca2a209de5514b35ca64943394e164f842e7d1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 15 Sep 2018 18:37:11 -0600 Subject: [PATCH] Update Profile model, add new AP methods --- app/Profile.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/Profile.php b/app/Profile.php index 4baef2ba2..92d1bad3f 100644 --- a/app/Profile.php +++ b/app/Profile.php @@ -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(); + } }