浏览代码

Update AP helpers, remove tombstone support until race condition fixed

Daniel Supernault 5 年之前
父节点
当前提交
9661b7788c
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 1
      app/Util/ActivityPub/Helpers.php
  2. 2 0
      app/Util/ActivityPub/Inbox.php

+ 1 - 1
app/Util/ActivityPub/Helpers.php

@@ -236,7 +236,7 @@ class Helpers {
 				$activity = ['object' => $res];
 			}
 
-			if(isset($res['content']) == false) {
+			if(isset($activity['object']['content']) == false) {
 				abort(400, 'Invalid object');
 			}
 

+ 2 - 0
app/Util/ActivityPub/Inbox.php

@@ -323,6 +323,8 @@ class Inbox
                 break;
 
             case 'Tombstone':
+                    // todo: fix race condition
+                    return; 
                     $profile = Helpers::profileFetch($actor);
                     $status = Status::whereProfileId($profile->id)
                         ->whereUri($id)