mirror of
https://github.com/ihabunek/toot.git
synced 2024-12-04 14:46:33 -05:00
Try to use media's text_url if present
This field is sometimes provides and gives a shortened URL which is easier to click on in a terminal.
This commit is contained in:
parent
a8774fc9ea
commit
9fb52fb0a1
@ -238,7 +238,8 @@ class StatusDetails(urwid.Pile):
|
||||
yield ("pack", urwid.Text([("bold", "Media attachment"), " (", m["type"], ")"]))
|
||||
if m["description"]:
|
||||
yield ("pack", urwid.Text(m["description"]))
|
||||
yield ("pack", urwid.Text(("link", m["url"])))
|
||||
url = m.get("text_url") or m["url"]
|
||||
yield ("pack", urwid.Text(("link", url)))
|
||||
|
||||
poll = status.data.get("poll")
|
||||
if poll:
|
||||
|
Loading…
Reference in New Issue
Block a user