sforkowany z mirror/social
source verification
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>alpha1
rodzic
31b729f5d4
commit
6eb6561737
|
@ -181,7 +181,6 @@ class FollowService implements ICoreService {
|
|||
*/
|
||||
public function save(ACore $follow) {
|
||||
/** @var Follow $follow */
|
||||
|
||||
if ($follow->isRoot()) {
|
||||
$follow->verify($follow->getActorId());
|
||||
try {
|
||||
|
|
|
@ -37,6 +37,7 @@ use OCA\Social\Exceptions\ActorDoesNotExistException;
|
|||
use OCA\Social\Exceptions\RequestException;
|
||||
use OCA\Social\Exceptions\SocialAppConfigException;
|
||||
use OCA\Social\Model\ActivityPub\ACore;
|
||||
use OCA\Social\Model\ActivityPub\Activity\Create;
|
||||
use OCA\Social\Model\ActivityPub\Note;
|
||||
use OCA\Social\Model\ActivityPub\Person;
|
||||
use OCA\Social\Model\InstancePath;
|
||||
|
@ -229,7 +230,20 @@ class NoteService implements ICoreService {
|
|||
*/
|
||||
public function save(ACore $note) {
|
||||
/** @var Note $note */
|
||||
$this->notesRequest->save($note);
|
||||
if ($note->isRoot()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$parent = $note->getParent();
|
||||
if ($parent->isRoot() === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($parent->getType() === Create::TYPE) {
|
||||
$parent->verify(($note->getAttributedTo()));
|
||||
$this->notesRequest->save($note);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue