From e5bbd45b49c7c6d0f17441b0a2f6fe83d7b6038f Mon Sep 17 00:00:00 2001 From: Michael Demetriou Date: Thu, 10 Oct 2019 10:59:14 +0300 Subject: [PATCH] Change the result that webfinger returns from the first alias to the last because mastodon doesn't like https://my.instance/@me but https://my.instance/users/me --- webfinger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webfinger.go b/webfinger.go index d19478f..715e1cf 100644 --- a/webfinger.go +++ b/webfinger.go @@ -108,5 +108,5 @@ func RemoteLookup(handle string) string { aliases := result["aliases"].([]interface{}) - return aliases[0].(string) + return aliases[len(aliases)-1].(string) }