diff --git a/toot/tui/entities.py b/toot/tui/entities.py index 324a774..050d005 100644 --- a/toot/tui/entities.py +++ b/toot/tui/entities.py @@ -31,6 +31,9 @@ class Status: self.reblogged = data.get("reblogged", False) self.in_reply_to = data.get("in_reply_to_id") + reblog = data.get("reblog") + self.url = reblog.get("url") if reblog else data.get("url") + def get_author(self): # Show the author, not the persopn who reblogged data = self.data["reblog"] or self.data diff --git a/toot/tui/timeline.py b/toot/tui/timeline.py index 1574536..5b2f536 100644 --- a/toot/tui/timeline.py +++ b/toot/tui/timeline.py @@ -149,8 +149,8 @@ class Timeline(urwid.Columns): return if key in ("v", "V"): - if status.data["url"]: - webbrowser.open(status.data["url"]) + if status.url: + webbrowser.open(status.url) return return super().keypress(size, key)