pull/14/head
Dashie 2018-08-14 22:22:55 +02:00
rodzic 75b6b9d833
commit 99e86b2aca
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: C2D57B325840B755
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -64,8 +64,8 @@ def webfinger(
return None
def get_remote_follow_template(resource: str) -> Optional[str]:
data = webfinger(resource)
def get_remote_follow_template(resource: str, debug: bool = False) -> Optional[str]:
data = webfinger(resource, debug=debug)
if data is None:
return None
for link in data["links"]:
@ -74,13 +74,13 @@ def get_remote_follow_template(resource: str) -> Optional[str]:
return None
def get_actor_url(resource: str) -> Optional[str]:
def get_actor_url(resource: strm, debug: bool = False) -> Optional[str]:
"""Mastodon-like WebFinger resolution to retrieve the activity stream Actor URL.
Returns:
the Actor URL or None if the resolution failed.
"""
data = webfinger(resource)
data = webfinger(resource, debug=debug)
if data is None:
return None
for link in data["links"]: