[PLUGIN][ActivityPub][Tests] Create Actor Tests
This commit is contained in:
@@ -79,7 +79,10 @@ class Actor extends Model
|
||||
* Create an Entity from an ActivityStreams 2.0 JSON string
|
||||
* This will persist a new GSActor, ActivityPubRSA, and ActivityPubActor
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface
|
||||
* @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface
|
||||
* @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface
|
||||
* @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface
|
||||
*/
|
||||
public static function fromJson(string|AbstractObject $json, array $options = []): ActivitypubActor
|
||||
{
|
||||
@@ -187,7 +190,7 @@ class Actor extends Model
|
||||
} else {
|
||||
// Delete existing avatar if any
|
||||
try {
|
||||
$avatar = DB::findOneBy('avatar', ['actor_id' => $actor->getId()]);
|
||||
$avatar = DB::findOneBy(\Component\Avatar\Entity\Avatar::class, ['actor_id' => $actor->getId()]);
|
||||
$avatar->delete();
|
||||
Event::handle('AvatarUpdate', [$actor->getId()]);
|
||||
} catch (Exception) {
|
||||
|
Reference in New Issue
Block a user