2021-06-27 15:52:18 +01:00
|
|
|
package federation
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/url"
|
|
|
|
|
2021-08-10 12:32:39 +01:00
|
|
|
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
2021-06-27 15:52:18 +01:00
|
|
|
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
|
|
|
)
|
|
|
|
|
2021-08-10 12:32:39 +01: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 15:52:18 +01:00
|
|
|
}
|
|
|
|
|
2021-08-10 12:32:39 +01: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 15:52:18 +01:00
|
|
|
}
|
|
|
|
|
2021-08-10 12:32:39 +01:00
|
|
|
func (f *federator) EnrichRemoteStatus(username string, status *gtsmodel.Status) (*gtsmodel.Status, error) {
|
|
|
|
return f.dereferencer.EnrichRemoteStatus(username, status)
|
2021-06-27 15:52:18 +01:00
|
|
|
}
|
2021-07-05 12:23:03 +01:00
|
|
|
|
2021-08-10 12:32:39 +01:00
|
|
|
func (f *federator) DereferenceRemoteThread(username string, statusIRI *url.URL) error {
|
|
|
|
return f.dereferencer.DereferenceThread(username, statusIRI)
|
2021-07-05 12:23:03 +01:00
|
|
|
}
|
|
|
|
|
2021-08-10 12:32:39 +01:00
|
|
|
func (f *federator) GetRemoteInstance(username string, remoteInstanceURI *url.URL) (*gtsmodel.Instance, error) {
|
|
|
|
return f.dereferencer.GetRemoteInstance(username, remoteInstanceURI)
|
2021-07-05 12:23:03 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *federator) DereferenceAnnounce(announce *gtsmodel.Status, requestingUsername string) error {
|
2021-08-10 12:32:39 +01:00
|
|
|
return f.dereferencer.DereferenceAnnounce(announce, requestingUsername)
|
2021-07-05 12:23:03 +01:00
|
|
|
}
|