浏览代码

Update Profile model, add new AP methods

Daniel Supernault 6 年之前
父节点
当前提交
63ca2a209d
共有 1 个文件被更改,包括 15 次插入0 次删除
  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();
+    }
 }