From 5faeb4de2032e112ab49751eeeb906ac43826f3d Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Sun, 28 May 2023 13:08:35 +0100 Subject: [chore] tidy up media manager, add calling func to errors, build-script improvements (#1835) * media manager tidy-up: de-interface and remove unused PostDataFunc Signed-off-by: kim * remove last traces of media.Manager being an interface Signed-off-by: kim * update error to provide caller, allow tuneable via build tags Signed-off-by: kim * remove kim-specific build script changes Signed-off-by: kim * fix merge conflicts Signed-off-by: kim * update build-script to support externally setting build variables Signed-off-by: kim --------- Signed-off-by: kim --- internal/processing/account/update.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/processing/account/update.go') diff --git a/internal/processing/account/update.go b/internal/processing/account/update.go index d7018367d..01c62d7e3 100644 --- a/internal/processing/account/update.go +++ b/internal/processing/account/update.go @@ -300,7 +300,7 @@ func (p *Processor) UpdateAvatar(ctx context.Context, avatar *multipart.FileHead Description: description, } - processingMedia, err := p.mediaManager.PreProcessMedia(ctx, dataFunc, nil, accountID, ai) + processingMedia, err := p.mediaManager.PreProcessMedia(ctx, dataFunc, accountID, ai) if err != nil { return nil, fmt.Errorf("UpdateAvatar: error processing avatar: %s", err) } @@ -327,7 +327,7 @@ func (p *Processor) UpdateHeader(ctx context.Context, header *multipart.FileHead Header: &isHeader, } - processingMedia, err := p.mediaManager.PreProcessMedia(ctx, dataFunc, nil, accountID, ai) + processingMedia, err := p.mediaManager.PreProcessMedia(ctx, dataFunc, accountID, ai) if err != nil { return nil, fmt.Errorf("UpdateHeader: error processing header: %s", err) } -- cgit v1.2.3