From 0e29f1f5bb68a48d9b837d7f4e0a16370734955b Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 9 May 2023 12:16:10 +0200 Subject: [feature] Enable federation in/out of profile PropertyValue fields (#1722) Co-authored-by: kim Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> --- internal/federation/federatingactor.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'internal/federation/federatingactor.go') diff --git a/internal/federation/federatingactor.go b/internal/federation/federatingactor.go index 18cdf2106..33ae38220 100644 --- a/internal/federation/federatingactor.go +++ b/internal/federation/federatingactor.go @@ -59,11 +59,11 @@ type federatingActor struct { // implements the pub.FederatingActor interface. func newFederatingActor(c pub.CommonBehavior, s2s pub.FederatingProtocol, db pub.Database, clock pub.Clock) pub.FederatingActor { sideEffectActor := pub.NewSideEffectActor(c, s2s, nil, db, clock) - customActor := pub.NewCustomActor(sideEffectActor, false, true, clock) + sideEffectActor.Serialize = ap.Serialize // hook in our own custom Serialize function return &federatingActor{ sideEffectActor: sideEffectActor, - wrapped: customActor, + wrapped: pub.NewCustomActor(sideEffectActor, false, true, clock), } } @@ -165,7 +165,8 @@ func (f *federatingActor) PostInboxScheme(ctx context.Context, w http.ResponseWr // If activity Object is a Statusable, we'll want to replace the // parsed `content` value with the value from the raw JSON instead. // See https://github.com/superseriousbusiness/gotosocial/issues/1661 - ap.NormalizeActivityObject(activity, rawActivity) + // Likewise, if it's an Accountable, we'll normalize some fields on it. + ap.NormalizeIncomingActivityObject(activity, rawActivity) // Allow server implementations to set context data with a hook. ctx, err = f.sideEffectActor.PostInboxRequestBodyHook(ctx, r, activity) -- cgit v1.2.3