mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-07 18:28:06 -06:00
Remote instance dereferencing (#70)
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;
This commit is contained in:
parent
869a6c111c
commit
87cf621e21
13 changed files with 750 additions and 303 deletions
16
internal/transport/deliver.go
Normal file
16
internal/transport/deliver.go
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package transport
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func (t *transport) BatchDeliver(c context.Context, b []byte, recipients []*url.URL) error {
|
||||
return t.sigTransport.BatchDeliver(c, b, recipients)
|
||||
}
|
||||
|
||||
func (t *transport) Deliver(c context.Context, b []byte, to *url.URL) error {
|
||||
l := t.log.WithField("func", "Deliver")
|
||||
l.Debugf("performing POST to %s", to.String())
|
||||
return t.sigTransport.Deliver(c, b, to)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue