kopia lustrzana https://github.com/nextcloud/social
rodzic
c52e214614
commit
b217d0b0a6
lib/Service/ActivityPub
|
@ -179,7 +179,7 @@ class FollowService implements ICoreService {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function save(ACore $follow) {
|
||||
public function parse(ACore $follow) {
|
||||
/** @var Follow $follow */
|
||||
if ($follow->isRoot()) {
|
||||
$follow->verify($follow->getActorId());
|
||||
|
@ -214,5 +214,11 @@ class FollowService implements ICoreService {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ACore $item
|
||||
*/
|
||||
public function delete(ACore $item) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ class PersonService implements ICoreService {
|
|||
|
||||
try {
|
||||
$actor->setSource(json_encode($actor, JSON_UNESCAPED_SLASHES));
|
||||
$this->save($actor, true);
|
||||
$this->parse($actor, true);
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class PersonService implements ICoreService {
|
|||
}
|
||||
|
||||
try {
|
||||
$this->save($actor);
|
||||
$this->parse($actor);
|
||||
} catch (Exception $e) {
|
||||
throw new InvalidResourceException($e->getMessage());
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ class PersonService implements ICoreService {
|
|||
}
|
||||
|
||||
try {
|
||||
$this->save($actor);
|
||||
$this->parse($actor);
|
||||
} catch (Exception $e) {
|
||||
throw new InvalidResourceException($e->getMessage());
|
||||
}
|
||||
|
@ -202,10 +202,21 @@ class PersonService implements ICoreService {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function save(ACore $person, bool $local = false) {
|
||||
public function parse(ACore $person, bool $local = false) {
|
||||
/** @var Person $person */
|
||||
if ($person->isRoot() === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->cacheActorsRequest->save($person, $local);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ACore $item
|
||||
*/
|
||||
public function delete(ACore $item) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,14 @@ class UndoService implements ICoreService {
|
|||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function save(ACore $undo) {
|
||||
public function parse(ACore $undo) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param ACore $item
|
||||
*/
|
||||
public function delete(ACore $item) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue