Explorar o código

Update Profile model, add new AP methods

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
63ca2a209d
Modificáronse 1 ficheiros con 15 adicións e 0 borrados
  1. 15 0
      app/Profile.php

+ 15 - 0
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();
+    }
 }