Open Dazzel opened 9 years ago
First three tags could repeat themselves. Why not the Imagename itself? If the Bot runs in Multiple Chats at the same time, we don't need to download the image anymore, we can just take it from the temporary download folder. This saves us outgoing bandwidth and would be greate for Issue #16 - If this is run in multiple Chats. But then again, we need to clean at some point the temporary folder, so we don't waste too much space on the HDD.
We already have checks in place so we do not need to download and upload the same picture multiple times. This is handled by telgram itself: You get an file id after uploading an file to their servers. If you send this file id on the next "upload" telegram takes the already uploaded picture and sends it to the user.
The temporary folder is cleaned immediately after the image has been uploaded.
For caching see #18
But we don't check yet if we already sent the picture, so we download it in first place and then send it again. Even though the Image then ain't really sent, because the file ID is already known at the Telegram servers.
No, we only get the data from the pr0gramm api and then we check if this image was already downloaded. If so, we do not download it again and send the file_id instead
Well, then just lets use as filename the id provided by pr0gramm (e.g. /top/990527 - 990527 as filename)
We need to use better file names if we send them as documents.
Maybe the first three tags?