Handle deleted actors in the notifications
This commit is contained in:
parent
108b957dcc
commit
6aee810a1f
1 changed files with 5 additions and 2 deletions
7
app.py
7
app.py
|
@ -67,6 +67,7 @@ from little_boxes.activitypub import clean_activity
|
||||||
from little_boxes.activitypub import get_backend
|
from little_boxes.activitypub import get_backend
|
||||||
from little_boxes.content_helper import parse_markdown
|
from little_boxes.content_helper import parse_markdown
|
||||||
from little_boxes.errors import ActivityNotFoundError
|
from little_boxes.errors import ActivityNotFoundError
|
||||||
|
from little_boxes.errors import ActivityGoneError
|
||||||
from little_boxes.errors import Error
|
from little_boxes.errors import Error
|
||||||
from little_boxes.errors import NotFromOutboxError
|
from little_boxes.errors import NotFromOutboxError
|
||||||
from little_boxes.httpsig import HTTPSigAuth
|
from little_boxes.httpsig import HTTPSigAuth
|
||||||
|
@ -265,8 +266,10 @@ def get_actor(url):
|
||||||
if not url:
|
if not url:
|
||||||
return None
|
return None
|
||||||
print(f"GET_ACTOR {url}")
|
print(f"GET_ACTOR {url}")
|
||||||
return ACTOR_SERVICE.get(url)
|
try:
|
||||||
|
return ACTOR_SERVICE.get(url)
|
||||||
|
except (ActivityNotFoundError, ActivityGoneError):
|
||||||
|
return f"Deleted<{url}>"
|
||||||
|
|
||||||
@app.template_filter()
|
@app.template_filter()
|
||||||
def format_time(val):
|
def format_time(val):
|
||||||
|
|
Loading…
Reference in a new issue