prefer url
over id
as it's usually a more user-friendly url
This commit is contained in:
parent
921e59e0f8
commit
44a635b708
1 changed files with 2 additions and 1 deletions
|
@ -61,6 +61,7 @@ def format_note(actor, note, type="Create"):
|
|||
retoot_url = note
|
||||
retoot_instance = urllib.parse.urlparse(retoot_url).hostname
|
||||
retoot = activity_request(retoot_url)
|
||||
retoot_url = retoot.data.get("url", retoot.data["id"])
|
||||
|
||||
original_tooter = ap_actor.Actor(retoot.data["attributedTo"])
|
||||
original_tooter.load()
|
||||
|
@ -72,7 +73,7 @@ def format_note(actor, note, type="Create"):
|
|||
|
||||
elif type == "Create":
|
||||
content = utils.http.strip_html(note["content"])
|
||||
url = note["id"]
|
||||
url = note.get("url", note["id"])
|
||||
|
||||
return (note.get("summary", None),
|
||||
"%s: %s" % (actor.username, content), url)
|
||||
|
|
Loading…
Reference in a new issue