From b3194f1fee735237752e8d1a79c71ff8badfad20 Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Thu, 10 Aug 2023 22:15:17 +0200 Subject: [PATCH] Add missing `published` field to Announce --- internal/typeutils/astointernal.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/typeutils/astointernal.go b/internal/typeutils/astointernal.go index 7b1ba039..12c2650e 100644 --- a/internal/typeutils/astointernal.go +++ b/internal/typeutils/astointernal.go @@ -21,8 +21,6 @@ import ( "context" "errors" "fmt" - "net/url" - "github.com/miekg/dns" "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/config" @@ -32,6 +30,8 @@ import ( "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/superseriousbusiness/gotosocial/internal/uris" "github.com/superseriousbusiness/gotosocial/internal/util" + "net/url" + "time" ) func (c *converter) ASRepresentationToAccount(ctx context.Context, accountable ap.Accountable, accountDomain string) (*gtsmodel.Account, error) { @@ -630,8 +630,8 @@ func (c *converter) ASAnnounceToStatus(ctx context.Context, announceable ap.Anno // Extract published time for the boost. published, err := ap.ExtractPublished(announceable) if err != nil { - err = gtserror.Newf("error extracting published: %w", err) - return nil, isNew, err + //err = gtserror.Newf("error extracting published: %w", err) + published = time.Now().UTC() } status.CreatedAt = published status.UpdatedAt = published