2021-06-27 16:52:18 +02:00
|
|
|
package federation
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/url"
|
|
|
|
|
2021-08-10 13:32:39 +02:00
|
|
|
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
2021-06-27 16:52:18 +02:00
|
|
|
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
|
|
|
)
|
|
|
|
|
2021-08-10 13:32:39 +02:00
|
|
|
func (f *federator) GetRemoteAccount(username string, remoteAccountID *url.URL, refresh bool) (*gtsmodel.Account, bool, error) {
|
|
|
|
return f.dereferencer.GetRemoteAccount(username, remoteAccountID, refresh)
|
2021-06-27 16:52:18 +02:00
|
|
|
}
|
|
|
|
|
2021-08-10 13:32:39 +02:00
|
|
|
func (f *federator) GetRemoteStatus(username string, remoteStatusID *url.URL, refresh bool) (*gtsmodel.Status, ap.Statusable, bool, error) {
|
|
|
|
return f.dereferencer.GetRemoteStatus(username, remoteStatusID, refresh)
|
2021-06-27 16:52:18 +02:00
|
|
|
}
|
|
|
|
|
2021-08-10 13:32:39 +02:00
|
|
|
func (f *federator) EnrichRemoteStatus(username string, status *gtsmodel.Status) (*gtsmodel.Status, error) {
|
|
|
|
return f.dereferencer.EnrichRemoteStatus(username, status)
|
2021-06-27 16:52:18 +02:00
|
|
|
}
|
2021-07-05 13:23:03 +02:00
|
|
|
|
2021-08-10 13:32:39 +02:00
|
|
|
func (f *federator) DereferenceRemoteThread(username string, statusIRI *url.URL) error {
|
|
|
|
return f.dereferencer.DereferenceThread(username, statusIRI)
|
2021-07-05 13:23:03 +02:00
|
|
|
}
|
|
|
|
|
2021-08-10 13:32:39 +02:00
|
|
|
func (f *federator) GetRemoteInstance(username string, remoteInstanceURI *url.URL) (*gtsmodel.Instance, error) {
|
|
|
|
return f.dereferencer.GetRemoteInstance(username, remoteInstanceURI)
|
2021-07-05 13:23:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *federator) DereferenceAnnounce(announce *gtsmodel.Status, requestingUsername string) error {
|
2021-08-10 13:32:39 +02:00
|
|
|
return f.dereferencer.DereferenceAnnounce(announce, requestingUsername)
|
2021-07-05 13:23:03 +02:00
|
|
|
}
|