mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-11-25 02:35:57 +03:00
87cf621e21
Remote instances are now dereferenced when they post to an inbox on a GtS instance. Dereferencing will be done first by checking the /api/v1/instance endpoint of an instance. If that doesn't work, /.well-known/nodeinfo will be checked. If that doesn't work, only a minimal representation of the instance will be stored. A new field was added to the Instance database model. To create it: alter table instances add column contact_account_username text;
12 lines
274 B
Go
12 lines
274 B
Go
package transport
|
|
|
|
import (
|
|
"context"
|
|
"net/url"
|
|
)
|
|
|
|
func (t *transport) Dereference(c context.Context, iri *url.URL) ([]byte, error) {
|
|
l := t.log.WithField("func", "Dereference")
|
|
l.Debugf("performing GET to %s", iri.String())
|
|
return t.sigTransport.Dereference(c, iri)
|
|
}
|