feat(storage/telegram): add support for uploading images excluding webp format

This commit is contained in:
krau
2025-08-02 11:41:18 +08:00
parent ccf206d176
commit 36285a0700

View File

@@ -132,6 +132,8 @@ func (t *Telegram) Save(ctx context.Context, r io.Reader, storagePath string) er
media = docb.Video().SupportsStreaming()
case strings.HasPrefix(mtypeStr, "audio/"):
media = docb.Audio().Title(filename)
case strings.HasPrefix(mtypeStr, "image/") && !strings.HasSuffix(mtypeStr, "webp"):
media = message.UploadedPhoto(file, caption)
}
sender := tctx.Sender