Add missing published field to Announce

This commit is contained in:
Rafael Caricio 2023-08-10 22:15:17 +02:00
parent af29c06290
commit b3194f1fee
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947

View file

@ -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