From 10793d22df72f12f2f14c730c09b5018b5b6e63a Mon Sep 17 00:00:00 2001 From: winter Date: Tue, 17 Dec 2024 20:43:44 +0000 Subject: bugfixing --- Digitigrade/Model/Actor.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Digitigrade/Model/Actor.php') diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php index 5974f40..2d5eba7 100644 --- a/Digitigrade/Model/Actor.php +++ b/Digitigrade/Model/Actor.php @@ -34,6 +34,9 @@ class Actor extends PushableModel { bool $automated = false, bool $requestToFollow = true // setting this true by default as i think it's better for privacy ): self { + if (self::findLocalByHandle($handle) != null) { + throw new \RuntimeException('an actor with that local handle already exists!'); + } $actor = new self(); $actor->uri = path_to_uri("/user/$handle"); $actor->isLocal = true; -- cgit v1.3