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

@ -18,8 +18,6 @@
package media 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. // This should be enough to pass along to the media processor.
attachmentIDs := []string{} attachmentIDs := []string{}
for _, a := range status.GTSMediaAttachments { 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 // it might have been processed elsewhere so check first if it's already in the database or not
maybeAttachment := &gtsmodel.MediaAttachment{} maybeAttachment := &gtsmodel.MediaAttachment{}

View file

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

View file

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