diff --git a/fediseer/consts.py b/fediseer/consts.py index 5ced503..a2844b6 100644 --- a/fediseer/consts.py +++ b/fediseer/consts.py @@ -2,4 +2,5 @@ FEDISEER_VERSION = "0.5.0" SUPPORTED_SOFTWARE = [ "lemmy", "mastodon", + "friendica", ] \ No newline at end of file diff --git a/fediseer/fediverse.py b/fediseer/fediverse.py index dfa8181..ad41294 100644 --- a/fediseer/fediverse.py +++ b/fediseer/fediverse.py @@ -23,6 +23,7 @@ def get_admin_for_software(software: str, domain: str): software_map = { "lemmy": get_lemmy_admins, "mastodon": get_mastodon_admins, + "friendica": get_mastodon_admins, } if software not in software_map: return [] @@ -41,7 +42,7 @@ def get_nodeinfo(domain): } wellknown = requests.get(f"https://{domain}/.well-known/nodeinfo", headers=headers, timeout=3).json() headers["Sec-Fetch-Site"] = "cross-site" - nodeinfo = requests.get(wellknown['links'][0]['href'], headers=headers, timeout=3).json() + nodeinfo = requests.get(wellknown['links'][-1]['href'], headers=headers, timeout=3).json() return nodeinfo except Exception as err: return None \ No newline at end of file diff --git a/fediseer/messaging.py b/fediseer/messaging.py index 557be21..14d9fe9 100644 --- a/fediseer/messaging.py +++ b/fediseer/messaging.py @@ -38,6 +38,7 @@ class ActivityPubPM: software_map = { "lemmy": self.send_lemmy_pm, "mastodon": self.send_mastodon_pm, + "friendica": self.send_mastodon_pm, "fediseer": self.send_fediseer_pm, } return software_map[software](message, username, domain)