RasmusLindroth / tut

TUI for Mastodon with vim inspired keys
https://tut.anv.nu
MIT License
450 stars 29 forks source link

Allow the original page of a status to be opened #275

Open LawnGnome opened 1 year ago

LawnGnome commented 1 year ago

This adds a link when the "open" option is selected for a status that matches the "open original page" overflow menu item for a status in the Mastodon web UI.

immae commented 2 months ago

Suggestion: Same for users

diff --git a/api/item.go b/api/item.go
index 7e31720..d26669f 100644
--- a/api/item.go
+++ b/api/item.go
@@ -78,6 +78,12 @@ func getUrlsUser(user *mastodon.Account) ([]util.URL, []mastodon.Mention, []mast
                urls = append(urls, fu...)
        }

+       urls = append(urls, util.URL{
+               Text: user.URL +  " (user page)",
+               URL: user.URL,
+               Classes: []string{},
+       })
+
        return urls, []mastodon.Mention{}, []mastodon.Tag{}, len(urls)
 }