mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Fix webfinger domain support
This commit is contained in:
parent
f34bce180c
commit
adbdf6f320
1 changed files with 1 additions and 1 deletions
|
@ -59,7 +59,7 @@ def _handle(raw_actor: ap.RawObject) -> str:
|
||||||
try:
|
try:
|
||||||
json_resp = resp.json()
|
json_resp = resp.json()
|
||||||
if json_resp.get("subject", "").startswith("acct:"):
|
if json_resp.get("subject", "").startswith("acct:"):
|
||||||
return json_resp["subject"].removeprefix("acct:")
|
return "@" + json_resp["subject"].removeprefix("acct:")
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception(f"Failed to parse webfinger response for {handle}")
|
logger.exception(f"Failed to parse webfinger response for {handle}")
|
||||||
return handle
|
return handle
|
||||||
|
|
Loading…
Reference in a new issue