From 85038ca07c9909eb6503d5b0e529a2cc080d2a06 Mon Sep 17 00:00:00 2001 From: winter Date: Tue, 14 Jan 2025 21:39:11 +0000 Subject: fix bugs in note federation --- Digitigrade/Model/Actor.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Digitigrade/Model/Actor.php') diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php index c8cc25e..0f87ed3 100644 --- a/Digitigrade/Model/Actor.php +++ b/Digitigrade/Model/Actor.php @@ -215,6 +215,10 @@ class Actor extends PushableModel implements RpcReceiver { } public function findHomeInstance(): Instance { + if ($this->isLocal) { + // can't do this because we don't keep track of ourself in the instance table + throw new \RuntimeException("attempted to find the instance of a local actor"); + } return Instance::findByHostname(hostname_from_uri($this->uri)); } -- cgit v1.3