osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.69k stars 1.02k forks source link

show contact:mastodon=* for POIs #15452

Open tiptoptom opened 2 years ago

tiptoptom commented 2 years ago

Show contact:mastodon=* if it's tagged in the POI details.

franco999 commented 2 years ago

While you are at it, add also "payment:mercado_pago". A payment method (and more) widely used in Latin America.

tiptoptom commented 1 year ago

I think for Mastodon the Username must be converted to a weblink as follows: username@server.org https://server.org/@username

dschep commented 1 year ago

mostly correct @tiptoptom. It should NOT be done by splitting the handle and assuming https://$HOST/$USER. To do it correctly you MUST do GET https://server.org/.well-known/webfinger?resource=acct:username@server.org to determine the actual page the user lives on. For example for myself (daniel@schep.me which is actually at https://social.schep.me), GET https://schep.me/.well-known/webfinger?resource=acct%3Adaniel%40schep.me returns

{
  "subject": "acct:daniel@schep.me",
  "aliases": [
    "https://social.schep.me"
  ],
  "links": [
    {
      "rel": "http://webfinger.net/rel/profile-page",
      "type": "text/html",
      "href": "https://social.schep.me/"
    },
    {
      "rel": "self",
      "type": "application/activity+json",
      "href": "https://social.schep.me"
    },
    {
      "rel": "http://ostatus.org/schema/1.0/subscribe",
      "template": "https://social.schep.me/admin/lookup?query={uri}"
    }
  ]
}

more info at https://webfinger.net/