This commit is contained in:
tsmethurst 2021-05-17 19:03:29 +02:00
commit 932702fbe1
5 changed files with 21 additions and 23 deletions

View file

@ -411,9 +411,9 @@ func (f *federatingDB) Create(ctx context.Context, asType vocab.Type) error {
}
fromFederatorChan <- gtsmodel.FromFederator{
APObjectType: gtsmodel.ActivityStreamsNote,
APObjectType: gtsmodel.ActivityStreamsNote,
APActivityType: gtsmodel.ActivityStreamsCreate,
GTSModel: status,
GTSModel: status,
}
}
}

View file

@ -18,8 +18,6 @@
package media
import "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
func (mh *mediaHandler) processVideoAttachment(data []byte, accountID string, contentType string, remoteURL string) (*gtsmodel.MediaAttachment, error) {
return nil, nil
}
// func (mh *mediaHandler) processVideoAttachment(data []byte, accountID string, contentType string, remoteURL string) (*gtsmodel.MediaAttachment, error) {
// return nil, nil
// }

View file

@ -117,7 +117,7 @@ func (p *processor) dereferenceStatusFields(status *gtsmodel.Status) error {
// This should be enough to pass along to the media processor.
attachmentIDs := []string{}
for _, a := range status.GTSMediaAttachments {
l.Debug("dereferencing attachment: %+v", a)
l.Debugf("dereferencing attachment: %+v", a)
// it might have been processed elsewhere so check first if it's already in the database or not
maybeAttachment := &gtsmodel.MediaAttachment{}

View file

@ -361,15 +361,15 @@ func extractAttachment(i Attachmentable) (*gtsmodel.MediaAttachment, error) {
return attachment, nil
}
func extractBlurhash(i withBlurhash) (string, error) {
if i.GetTootBlurhashProperty() == nil {
return "", errors.New("blurhash property was nil")
}
if i.GetTootBlurhashProperty().Get() == "" {
return "", errors.New("empty blurhash string")
}
return i.GetTootBlurhashProperty().Get(), nil
}
// func extractBlurhash(i withBlurhash) (string, error) {
// if i.GetTootBlurhashProperty() == nil {
// return "", errors.New("blurhash property was nil")
// }
// if i.GetTootBlurhashProperty().Get() == "" {
// return "", errors.New("empty blurhash string")
// }
// return i.GetTootBlurhashProperty().Get(), nil
// }
func extractHashtags(i withTag) ([]*gtsmodel.Tag, error) {
tags := []*gtsmodel.Tag{}

View file

@ -210,13 +210,13 @@ type withMediaType interface {
GetActivityStreamsMediaType() vocab.ActivityStreamsMediaTypeProperty
}
type withBlurhash interface {
GetTootBlurhashProperty() vocab.TootBlurhashProperty
}
// type withBlurhash interface {
// GetTootBlurhashProperty() vocab.TootBlurhashProperty
// }
type withFocalPoint interface {
// TODO
}
// type withFocalPoint interface {
// // TODO
// }
type withHref interface {
GetActivityStreamsHref() vocab.ActivityStreamsHrefProperty