bleakgrey / tootle

GTK-based Mastodon client for Linux
GNU General Public License v3.0
401 stars 61 forks source link

Some hashtags open in the browser #46

Closed tastytea closed 6 years ago

tastytea commented 6 years ago

Version: 0.1.3 Example status: https://soc.freedombone.net/objects/8fd66cff-ed8d-4c24-8a65-691782535379

It seems that tags from Pleroma and GNUSocial are affected.

bleakgrey commented 6 years ago

Yup, Tootle supports Mastodon API only and can't request data from other types of instances. I think opening those links in a browser is better than silently failing.

tastytea commented 6 years ago

Tootle could look up the tag-URL in the status and use that instead. The tag-URL points to the instance of the logged-in user. For the example status that would be:

{
…
    "tags" : [
      {
         "url" : "https://soc.ialis.me/tags/spycops",
         "name" : "spycops"
      }             
    ],
…
}
bleakgrey commented 6 years ago

The current behavior is similar. Mastodon automatically creates links for tags which Tootle uses while parsing toots. If a hashtag link looks like it's from Masto, Tootle tries to request all toots from current instance associated with with that hashtag. It it fails, it opens a link in the browser.