mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
Fail gracefully when looking reply actor
This commit is contained in:
@ -189,8 +189,11 @@ async def admin_new(
|
|||||||
content += f"{in_reply_to_object.actor.handle} "
|
content += f"{in_reply_to_object.actor.handle} "
|
||||||
for tag in in_reply_to_object.tags:
|
for tag in in_reply_to_object.tags:
|
||||||
if tag.get("type") == "Mention" and tag["name"] != LOCAL_ACTOR.handle:
|
if tag.get("type") == "Mention" and tag["name"] != LOCAL_ACTOR.handle:
|
||||||
mentioned_actor = await fetch_actor(db_session, tag["href"])
|
try:
|
||||||
content += f"{mentioned_actor.handle} "
|
mentioned_actor = await fetch_actor(db_session, tag["href"])
|
||||||
|
content += f"{mentioned_actor.handle} "
|
||||||
|
except Exception:
|
||||||
|
logger.exception(f"Failed to lookup {mentioned_actor}")
|
||||||
|
|
||||||
# Copy the content warning if any
|
# Copy the content warning if any
|
||||||
if in_reply_to_object.summary:
|
if in_reply_to_object.summary:
|
||||||
|
Reference in New Issue
Block a user