rework data function to provide filesize

This commit is contained in:
tsmethurst
2022-01-23 14:41:58 +01:00
parent 7d024ce74d
commit c157b1b20b
12 changed files with 56 additions and 57 deletions

View File

@@ -118,4 +118,4 @@ type AdditionalEmojiInfo struct {
}
// DataFunc represents a function used to retrieve the raw bytes of a piece of media.
type DataFunc func(ctx context.Context) (io.Reader, error)
type DataFunc func(ctx context.Context) (reader io.Reader, fileSize int, err error)