瀏覽代碼

Update AP helpers

Daniel Supernault 6 年之前
父節點
當前提交
9a8151a3a8
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 3 1
      app/Util/ActivityPub/Helpers.php
  2. 1 1
      app/Util/ActivityPub/Inbox.php

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

@@ -328,7 +328,9 @@ class Helpers {
 				$status->scope = $scope;
 				$status->visibility = $scope;
 				$status->save();
-				self::importNoteAttachment($res, $status);
+				if($reply_to == null) {
+					self::importNoteAttachment($res, $status);
+				}
 				return $status;
 			});
 

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

@@ -143,7 +143,7 @@ class Inbox
             return;
         }
 
-        if(Helpers::userInAudience($this->profile, $this->payload) == false) {
+        if($actor->followers()->count() == 0) {
             return;
         }