mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-25 00:53:31 -06:00
[chore] Add Federatingactor.Send() tests and log call (#509)
* expose testrig util functions * add tests for federatingActor * rename some suite vars
This commit is contained in:
parent
63f84da3e4
commit
d93e8ddf75
5 changed files with 169 additions and 26 deletions
|
|
@ -23,6 +23,7 @@ import (
|
|||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/superseriousbusiness/activity/pub"
|
||||
"github.com/superseriousbusiness/activity/streams/vocab"
|
||||
)
|
||||
|
|
@ -55,6 +56,7 @@ func newFederatingActor(c pub.CommonBehavior, s2s pub.FederatingProtocol, db pub
|
|||
// method will guaranteed work for non-custom Actors. For custom actors,
|
||||
// care should be used to not call this method if only C2S is supported.
|
||||
func (f *federatingActor) Send(c context.Context, outbox *url.URL, t vocab.Type) (pub.Activity, error) {
|
||||
logrus.Infof("federating actor: send activity %s via outbox %s", t.GetTypeName(), outbox)
|
||||
return f.actor.Send(c, outbox, t)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue