mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
Finish Question/poll support
This commit is contained in:
@ -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"]
|
||||
|
||||
|
Reference in New Issue
Block a user