diff options
| author | winter | 2025-01-13 18:06:05 +0000 |
|---|---|---|
| committer | winter | 2025-01-13 18:06:05 +0000 |
| commit | fb9efd9f4682f528b1832622d192b9b5544584a9 (patch) | |
| tree | 5d55870b8bb8910183fc7b35220e9ae3f83999d3 /Digitigrade/Model/Instance.php | |
| parent | 765bf9729cc31b7ff552922c6363373f218c1f24 (diff) | |
make the interaction buttons actually work
Diffstat (limited to 'Digitigrade/Model/Instance.php')
| -rw-r--r-- | Digitigrade/Model/Instance.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Digitigrade/Model/Instance.php b/Digitigrade/Model/Instance.php index 4242638..b3a179f 100644 --- a/Digitigrade/Model/Instance.php +++ b/Digitigrade/Model/Instance.php @@ -1,6 +1,7 @@ <?php namespace Digitigrade\Model; +use Digitigrade\GlobalConfig; use Digitigrade\Job\RefreshOutboundAuthToken; class Instance extends FetchableModel { @@ -26,6 +27,10 @@ class Instance extends FetchableModel { } public static function findByHostname(string $host, bool $autoSave = true, bool $forceRefetch = false): ?self { + if ($host == GlobalConfig::getInstance()->getCanonicalHost()) { + // refuse to fetch ourselves + return null; + } return self::findByUri("https://$host/.well-known/pawpub-instance", $autoSave, $forceRefetch); } |
