diff options
author | 2023-05-09 12:16:10 +0200 | |
---|---|---|
committer | 2023-05-09 11:16:10 +0100 | |
commit | 0e29f1f5bb68a48d9b837d7f4e0a16370734955b (patch) | |
tree | f08d203ec8ca8aeea728e5251b1dc3956524b4f4 /internal/federation/federatingactor.go | |
parent | [chore/performance] Make sender multiplier configurable (#1750) (diff) | |
download | gotosocial-0e29f1f5bb68a48d9b837d7f4e0a16370734955b.tar.xz |
[feature] Enable federation in/out of profile PropertyValue fields (#1722)
Co-authored-by: kim <grufwub@gmail.com>
Co-authored-by: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>
Diffstat (limited to 'internal/federation/federatingactor.go')
-rw-r--r-- | internal/federation/federatingactor.go | 7 |
1 files changed, 4 insertions, 3 deletions
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) |