From ba9d6b467a1f03447789844048d913738c843569 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 10 Nov 2023 19:29:26 +0100 Subject: [feature] Media attachment placeholders (#2331) * [feature] Use placeholders for unknown media types * fix read of underreported small files * switch to reduce nesting * simplify cleanup --- internal/processing/admin/emoji.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/processing/admin') diff --git a/internal/processing/admin/emoji.go b/internal/processing/admin/emoji.go index 568c4350b..689aad9dc 100644 --- a/internal/processing/admin/emoji.go +++ b/internal/processing/admin/emoji.go @@ -55,7 +55,7 @@ func (p *Processor) EmojiCreate(ctx context.Context, account *gtsmodel.Account, return nil, gtserror.NewErrorInternalError(fmt.Errorf("error creating id for new emoji: %s", err), "error creating emoji ID") } - emojiURI := uris.GenerateURIForEmoji(emojiID) + emojiURI := uris.URIForEmoji(emojiID) data := func(innerCtx context.Context) (io.ReadCloser, int64, error) { f, err := form.Image.Open() @@ -335,7 +335,7 @@ func (p *Processor) emojiUpdateCopy(ctx context.Context, emoji *gtsmodel.Emoji, return nil, gtserror.NewErrorInternalError(err) } - newEmojiURI := uris.GenerateURIForEmoji(newEmojiID) + newEmojiURI := uris.URIForEmoji(newEmojiID) data := func(ctx context.Context) (reader io.ReadCloser, fileSize int64, err error) { rc, err := p.state.Storage.GetStream(ctx, emoji.ImagePath) -- cgit v1.2.3