Finish Question/poll support
This commit is contained in:
parent
3d5a86d51e
commit
fb0081a554
8 changed files with 151 additions and 71 deletions
|
@ -134,13 +134,16 @@ class Object:
|
|||
break
|
||||
return attachments
|
||||
|
||||
@property
|
||||
@cached_property
|
||||
def url(self) -> str | None:
|
||||
obj_url = self.ap_object.get("url")
|
||||
if isinstance(obj_url, str):
|
||||
return obj_url
|
||||
elif obj_url:
|
||||
for u in ap.as_list(obj_url):
|
||||
if u.get("type") == "Link":
|
||||
return u["href"]
|
||||
|
||||
if u["mediaType"] == "text/html":
|
||||
return u["href"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue