mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 12:27:28 -06:00
linting
This commit is contained in:
parent
72c91c92d0
commit
932702fbe1
5 changed files with 21 additions and 23 deletions
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -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 := >smodel.MediaAttachment{}
|
||||
|
|
|
|||
|
|
@ -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{}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue