mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Bugfix when reading cached actor
This commit is contained in:
parent
a458b88259
commit
b7c421ff80
1 changed files with 12 additions and 2 deletions
|
@ -276,7 +276,13 @@ class MicroblogPubBackend(Backend):
|
||||||
"meta.undo": False,
|
"meta.undo": False,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if actor and actor["meta"].get("actor"):
|
|
||||||
|
# "type" check is here to skip old metadata for "old/buggy" followers
|
||||||
|
if (
|
||||||
|
actor
|
||||||
|
and actor["meta"].get("actor")
|
||||||
|
and "type" in actor["meta"]["actor"]
|
||||||
|
):
|
||||||
return actor["meta"]["actor"]
|
return actor["meta"]["actor"]
|
||||||
|
|
||||||
# Check if it's cached because it's a following
|
# Check if it's cached because it's a following
|
||||||
|
@ -287,7 +293,11 @@ class MicroblogPubBackend(Backend):
|
||||||
"meta.undo": False,
|
"meta.undo": False,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if actor2 and actor2["meta"].get("object"):
|
if (
|
||||||
|
actor2
|
||||||
|
and actor2["meta"].get("object")
|
||||||
|
and "type" in actor2["meta"]["object"]
|
||||||
|
):
|
||||||
return actor2["meta"]["object"]
|
return actor2["meta"]["object"]
|
||||||
|
|
||||||
# Fetch the URL via HTTP
|
# Fetch the URL via HTTP
|
||||||
|
|
Loading…
Reference in a new issue