diff options
| author | winter | 2025-03-31 17:35:22 +0100 |
|---|---|---|
| committer | winter | 2025-03-31 17:35:22 +0100 |
| commit | 5aa1633dbb51589b5ecdc253a14ae04cee0d3c5e (patch) | |
| tree | 3e922f9694cc30c38bb49d86fda2340bb14ad268 /Digitigrade | |
| parent | 065695cc2d4471b212124cf878fd74b21a302002 (diff) | |
reset outbound auth on failure
should hopefully resolve subscription state desyncs?
Diffstat (limited to 'Digitigrade')
| -rw-r--r-- | Digitigrade/Model/Instance.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Digitigrade/Model/Instance.php b/Digitigrade/Model/Instance.php index eecc6ff..a10c7b9 100644 --- a/Digitigrade/Model/Instance.php +++ b/Digitigrade/Model/Instance.php @@ -219,6 +219,10 @@ class Instance extends FetchableModel { if (str_contains($http_response_header[0], '200')) { return true; } elseif (str_contains($http_response_header[0], '401') || str_contains($http_response_header[0], '403')) { + // in this case we can't be certain whether it failed because wrong token or because they're not subscribed to us + // so just assume it's both :> + $this->auth->outboundPushEnabled = false; + $this->auth->outboundToken = false; throw new AuthException($this); } return false; |
