diff options
Diffstat (limited to 'Digitigrade/Model/Instance.php')
| -rw-r--r-- | Digitigrade/Model/Instance.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Digitigrade/Model/Instance.php b/Digitigrade/Model/Instance.php index 168a1de..4242638 100644 --- a/Digitigrade/Model/Instance.php +++ b/Digitigrade/Model/Instance.php @@ -34,7 +34,7 @@ class Instance extends FetchableModel { $auth = InstanceAuth::findWhere('instance_id = ?', [$this->id]); if ($auth == null) { $auth = new InstanceAuth(); - $auth->setOwnerId($this->id); + //$auth->setOwnerId($this->id); } $this->auth = $auth; } @@ -108,6 +108,11 @@ class Instance extends FetchableModel { // try to refresh it 1 hour before it expires, to leave some leeway $refreshAt = (new \DateTimeImmutable($data->expires))->sub(new \DateInterval('PT1H')); (new RefreshOutboundAuthToken($this->domain, $refreshAt))->submit(); + + // for now i think it makes sense to subscribe as soon as possible to all authed instances for maximum federation + // this is probably a bad idea in the long run but i'll cross that bridge when it comes to it + // see also the route for /subscribe + $this->subscribe(); } public function refreshOutboundAuthToken() { |
