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