diff --git a/VERSION b/VERSION index e19a7ba..4f7715f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.11.54 +v1.11.55 diff --git a/core/presentation/telegram/kandinsky_command.go b/core/presentation/telegram/kandinsky_command.go index e355ba7..85fc48b 100644 --- a/core/presentation/telegram/kandinsky_command.go +++ b/core/presentation/telegram/kandinsky_command.go @@ -239,14 +239,26 @@ func (r *Presentation) kandkinskyPaginateImagesCommandHandler( } album := make([]message.MultiMediaOption, 0, 10) + fileUploader := uploader.NewUploader(ctx.Raw) for id, image := range images { - album = append(album, - message.Photo( - &image.TgInputPhoto, - styling.Plain(fmt.Sprintf("%d) %s", id, image.KandinskyInput.Prompt)), - ), - ) + file, err := fileUploader.FromBytes(ctx, "kandinsky-image.png", image.ImgContent) + if err != nil { + return errors.WithStack(err) + } + + album = append(album, message.UploadedPhoto( + file, + styling.Plain(fmt.Sprintf("%d) %s", id, image.KandinskyInput.Prompt)), + )) + + // TODO send cached in TG image, if ref is not expired + // album = append(album, + // message.Photo( + // &image.TgInputPhoto, + // styling.Plain(fmt.Sprintf("%d) %s", id, image.KandinskyInput.Prompt)), + // ), + //) } _, err = ctx.Sender.To(update.EffectiveChat().GetInputPeer()).Album( diff --git a/docker-compose.yaml b/docker-compose.yaml index e5c64f4..29c34fb 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,7 +9,7 @@ services: fun_storage__mongo_db_url: "mongodb://mongodb:27017" fun_storage__clickhouse_url: "clickhouse:9000" fun_ds_supplier_url: "http://ds:8000" - image: ghcr.io/teadove/fun-telegram:v1.11.54 + image: ghcr.io/teadove/fun-telegram:v1.11.55 volumes: - ".mtproto:/.mtproto" - ".env:/.env"