Start supporting a server blocklist

This commit is contained in:
Thomas Sileo 2022-08-15 10:15:00 +02:00
parent 2d2b2e5873
commit 1e6a290fb3
6 changed files with 45 additions and 0 deletions

View file

@ -114,6 +114,10 @@ class Actor:
def attachments(self) -> list[ap.RawObject]:
return ap.as_list(self.ap_actor.get("attachment", []))
@cached_property
def server(self) -> str:
return urlparse(self.ap_id).netloc
class RemoteActor(Actor):
def __init__(self, ap_actor: ap.RawObject) -> None: