Skip to content

Commit

Permalink
auto: autocommit
Browse files Browse the repository at this point in the history
  • Loading branch information
pibragimov committed Apr 27, 2024
1 parent 79c0ba6 commit d79ad0c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.11.54
v1.11.55
24 changes: 18 additions & 6 deletions core/presentation/telegram/kandinsky_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d79ad0c

Please sign in to comment.