Syfaro / foxbot

Multiplatform bot for finding furry image sources and more!
https://t.me/FoxBot
MIT License
48 stars 6 forks source link

Detect comments on a Telegram "albums" #47

Closed Furikuda closed 3 years ago

Furikuda commented 3 years ago

Telegram allows posting groups of pictures as an album, to which one can add a comment, where the source might be stored (see example). In this case, the bot will try to search for the source of each picture in the album, even if the link is provided. In this case foxbot posted 6 additional messages:

imgurb-screenshot20210131-640797-lz87q3

Syfaro commented 3 years ago

Hi! Thanks for reporting this issue. This is unfortunately a tricky issue to address. A single FurAffinity link can't contain 6 images. Even if one image was properly sourced, it's possible that not every image in a media group is related and each item might have their own source. While a person can easily look at a group and determine that they're all part of a collection, it's very difficult to teach a computer how to do this. I suppose it's also possible to assume that a single link in a media group applies to all images, but that could also potentially result in unexpected behavior.

A potentially easy solution that doesn't fully address the problem but at least reduces the noise would be to consolidate all the sources for a media group into a single message instead of replying to each photo individually. Do you think this would be a good compromise? Or do you have another suggestion on how to handle this situation?

Furikuda commented 3 years ago

I think one message with multiple sources would be a good compromise indeed. I can't think of any other way to detect the case where one link wouldn't be enough for the whole album

Syfaro commented 3 years ago

While I still haven't gotten around to making it consolidate media group sources into a single post, you can now disable automatic sources just for media groups with the /groupalbums command.

https://github.com/Syfaro/foxbot/commit/f1a812881b022f3bfb03d72add191cb085b2d8e5