From cb9008fb412e75e6ec8c2f5970fb5530aed7bb3a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:21:45 +0200 Subject: [bugfix] Ensure `pending_approval` set on statuses + status faves (#3415) * [bugfix] Ensure pending_approval set on statuses + status faves * set PendingApproval on boosts * assume not pending approval --- internal/typeutils/astointernal.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/typeutils/astointernal.go') diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go index 9dd18dbb2..cf0c0719a 100644 --- a/internal/typeutils/astointernal.go +++ b/internal/typeutils/astointernal.go @@ -432,6 +432,10 @@ func (c *Converter) ASStatusToStatus(ctx context.Context, statusable ap.Statusab status.ApprovedByURI = approvedByURI.String() } + // Assume not pending approval; this may + // change when permissivity is checked. + status.PendingApproval = util.Ptr(false) + // status.Sensitive sensitive := ap.ExtractSensitive(statusable) status.Sensitive = &sensitive @@ -531,6 +535,10 @@ func (c *Converter) ASLikeToFave(ctx context.Context, likeable ap.Likeable) (*gt StatusID: target.ID, Status: target, URI: uri, + + // Assume not pending approval; this may + // change when permissivity is checked. + PendingApproval: util.Ptr(false), }, nil } @@ -656,6 +664,10 @@ func (c *Converter) ASAnnounceToStatus( boost.MentionIDs = make([]string, 0) boost.EmojiIDs = make([]string, 0) + // Assume not pending approval; this may + // change when permissivity is checked. + boost.PendingApproval = util.Ptr(false) + // Remaining fields on the boost will be // taken from the target status; it's not // our job to do all that dereferencing here. -- cgit v1.2.3