Improved audience support and implement featured collection

This commit is contained in:
Thomas Sileo 2022-06-26 18:07:55 +02:00
parent ff8975acab
commit 4bf54c7040
16 changed files with 284 additions and 37 deletions

View file

@ -58,7 +58,7 @@ class Object:
@property
def visibility(self) -> ap.VisibilityEnum:
return ap.object_visibility(self.ap_object)
return ap.object_visibility(self.ap_object, self.actor)
@property
def ap_context(self) -> str | None:
@ -68,6 +68,10 @@ class Object:
def sensitive(self) -> bool:
return self.ap_object.get("sensitive", False)
@property
def tags(self) -> list[ap.RawObject]:
return self.ap_object.get("tag", [])
@property
def attachments(self) -> list["Attachment"]:
attachments = []