mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-11 02:27:07 +01:00
use util function to extract webfinger parts
This commit is contained in:
parent
e8a65b9675
commit
8ffb1a8845
1 changed files with 3 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
"strings"
|
||||
|
||||
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/util"
|
||||
)
|
||||
|
||||
func (d *deref) fingerRemoteAccount(ctx context.Context, username string, targetUsername string, targetHost string) (accountDomain string, accountURI *url.URL, err error) {
|
||||
|
@ -58,7 +59,8 @@ func (d *deref) fingerRemoteAccount(ctx context.Context, username string, target
|
|||
return
|
||||
}
|
||||
|
||||
aaaaaaaaaaaaaaaaccountDomain
|
||||
var username, accountDomain string
|
||||
username, accountDomain, err = util.ExtractWebfingerParts(resp.Subject)
|
||||
|
||||
// look through the links for the first one that matches "application/activity+json", this is what we need
|
||||
for _, l := range resp.Links {
|
||||
|
|
Loading…
Reference in a new issue