usememos / telegram-integration

Memogram is an easy to use integration service for syncing messages and images from a Telegram bot into your Memos.
59 stars 15 forks source link

Memos will create separate memos for each photo in a Telegram message rather than multiple photos in one memo #49

Closed dwong33 closed 3 weeks ago

dwong33 commented 1 month ago

The content of this bug is the same as this one, but that issue is closed:

https://github.com/usememos/telegram-integration/issues/23

But the bug is not being addressed as of v0.22.4.

Previously, we can include multiple photos in a memos by using Telegram bot. But currently, if we attempt to create a memos with more than one photo, memos will create each photo a memo, which is not the expected outcome.

okainov commented 3 weeks ago

This sounds as trivial as replacing accessing last picture in if to for-loop here: https://github.com/usememos/telegram-integration/blob/main/memogram.go#L174

boojack commented 3 weeks ago

@okainov It's actually an arrry of PhotoSize, so this's not what we need.

okainov commented 3 weeks ago

Just looking at it, it still looks exactly what we need :) Each PhotoSize has FileID (which we use), so just iterate over it...

boojack commented 3 weeks ago

@okainov The problem now is that it will be saved as multiple memos instead of just one memo with the last image in it.

And the photosize is all available size of the image with same file id. Not what you thought.