forked from mirrors/gotosocial
Add missing published
field to Announce
This commit is contained in:
parent
af29c06290
commit
b3194f1fee
1 changed files with 4 additions and 4 deletions
|
@ -21,8 +21,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
|
||||||
|
|
||||||
"github.com/miekg/dns"
|
"github.com/miekg/dns"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
"github.com/superseriousbusiness/gotosocial/internal/ap"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/config"
|
"github.com/superseriousbusiness/gotosocial/internal/config"
|
||||||
|
@ -32,6 +30,8 @@ import (
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/log"
|
"github.com/superseriousbusiness/gotosocial/internal/log"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/uris"
|
"github.com/superseriousbusiness/gotosocial/internal/uris"
|
||||||
"github.com/superseriousbusiness/gotosocial/internal/util"
|
"github.com/superseriousbusiness/gotosocial/internal/util"
|
||||||
|
"net/url"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (c *converter) ASRepresentationToAccount(ctx context.Context, accountable ap.Accountable, accountDomain string) (*gtsmodel.Account, error) {
|
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.
|
// Extract published time for the boost.
|
||||||
published, err := ap.ExtractPublished(announceable)
|
published, err := ap.ExtractPublished(announceable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = gtserror.Newf("error extracting published: %w", err)
|
//err = gtserror.Newf("error extracting published: %w", err)
|
||||||
return nil, isNew, err
|
published = time.Now().UTC()
|
||||||
}
|
}
|
||||||
status.CreatedAt = published
|
status.CreatedAt = published
|
||||||
status.UpdatedAt = published
|
status.UpdatedAt = published
|
||||||
|
|
Loading…
Reference in a new issue