mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-28 20:02:24 -05:00
[feature] Serve bot accounts over AP as Service instead of Person (#3672)
* pepis * oopsie doopsie * bollocks
This commit is contained in:
parent
b42cb7a802
commit
9333bbc4d0
14 changed files with 315 additions and 175 deletions
|
|
@ -2853,7 +2853,7 @@ func NewTestActivities(accounts map[string]*gtsmodel.Account) map[string]Activit
|
|||
"this is a public status, please forward it!",
|
||||
"",
|
||||
URLMustParse("http://example.org/users/Some_User"),
|
||||
[]*url.URL{URLMustParse(pub.PublicActivityPubIRI)},
|
||||
[]*url.URL{ap.PublicURI()},
|
||||
nil,
|
||||
false,
|
||||
[]vocab.ActivityStreamsMention{},
|
||||
|
|
@ -3207,7 +3207,7 @@ func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote {
|
|||
"this is a public status, please forward it!",
|
||||
"",
|
||||
URLMustParse("http://example.org/users/Some_User"),
|
||||
[]*url.URL{URLMustParse(pub.PublicActivityPubIRI)},
|
||||
[]*url.URL{ap.PublicURI()},
|
||||
nil,
|
||||
false,
|
||||
[]vocab.ActivityStreamsMention{},
|
||||
|
|
@ -3228,7 +3228,7 @@ func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote {
|
|||
"",
|
||||
URLMustParse("https://unknown-instance.com/users/brand_new_person"),
|
||||
[]*url.URL{
|
||||
URLMustParse(pub.PublicActivityPubIRI),
|
||||
ap.PublicURI(),
|
||||
},
|
||||
[]*url.URL{},
|
||||
false,
|
||||
|
|
@ -3244,7 +3244,7 @@ func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote {
|
|||
"",
|
||||
URLMustParse("https://unknown-instance.com/users/brand_new_person"),
|
||||
[]*url.URL{
|
||||
URLMustParse(pub.PublicActivityPubIRI),
|
||||
ap.PublicURI(),
|
||||
},
|
||||
[]*url.URL{},
|
||||
false,
|
||||
|
|
@ -3265,7 +3265,7 @@ func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote {
|
|||
"",
|
||||
URLMustParse("https://unknown-instance.com/users/brand_new_person"),
|
||||
[]*url.URL{
|
||||
URLMustParse(pub.PublicActivityPubIRI),
|
||||
ap.PublicURI(),
|
||||
},
|
||||
[]*url.URL{},
|
||||
false,
|
||||
|
|
@ -3286,7 +3286,7 @@ func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote {
|
|||
"",
|
||||
URLMustParse("https://turnip.farm/users/turniplover6969"),
|
||||
[]*url.URL{
|
||||
URLMustParse(pub.PublicActivityPubIRI),
|
||||
ap.PublicURI(),
|
||||
},
|
||||
[]*url.URL{},
|
||||
false,
|
||||
|
|
@ -3309,7 +3309,7 @@ func NewTestFediStatuses() map[string]vocab.ActivityStreamsNote {
|
|||
"",
|
||||
URLMustParse("http://fossbros-anonymous.io/users/foss_satan"),
|
||||
[]*url.URL{
|
||||
URLMustParse(pub.PublicActivityPubIRI),
|
||||
ap.PublicURI(),
|
||||
},
|
||||
[]*url.URL{},
|
||||
false,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import (
|
|||
"github.com/superseriousbusiness/activity/pub"
|
||||
"github.com/superseriousbusiness/activity/streams"
|
||||
"github.com/superseriousbusiness/activity/streams/vocab"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
||||
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/federation"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
|
|
@ -81,7 +82,7 @@ type MockHTTPClient struct {
|
|||
// to customize how the client is mocked.
|
||||
//
|
||||
// Note that you should never ever make ACTUAL http calls with this thing.
|
||||
func NewMockHTTPClient(do func(req *http.Request) (*http.Response, error), relativeMediaPath string, extraPeople ...vocab.ActivityStreamsPerson) *MockHTTPClient {
|
||||
func NewMockHTTPClient(do func(req *http.Request) (*http.Response, error), relativeMediaPath string, extraPeople ...ap.Accountable) *MockHTTPClient {
|
||||
mockHTTPClient := &MockHTTPClient{}
|
||||
|
||||
if do != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue