Explorar o código

mastoapi: add `uri` field to verify_credentials

Mastodon split the field out from `url` for identification purposes in
version 4.2.0, leaving the previous for simply navigating to the user
page.  Some services (notably Bridgy Fed) rely on the `uri` as part of
their OAuth flow: https://github.com/snarfed/bridgy-fed/issues/2339
Sam May hai 5 meses
pai
achega
f67d501b96
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      mastoapi.c

+ 1 - 0
mastoapi.c

@@ -1459,6 +1459,7 @@ void credentials_get(char **body, char **ctype, int *status, snac snac)
     acct = xs_dict_append(acct, "last_status_at", xs_dict_get(snac.config, "published"));
     acct = xs_dict_append(acct, "note", xs_dict_get(snac.config, "bio"));
     acct = xs_dict_append(acct, "url", snac.actor);
+    acct = xs_dict_append(acct, "uri", snac.actor);
 
     acct = xs_dict_append(acct, "locked",
         xs_stock(xs_is_true(xs_dict_get(snac.config, "approve_followers")) ? XSTYPE_TRUE : XSTYPE_FALSE));