Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot doesn't prevent duplicates (files with same content but different names) #114

Closed
art435 opened this issue Dec 7, 2022 · 2 comments
Closed

Comments

@art435
Copy link

art435 commented Dec 7, 2022

Normally, people consider duplicates when 2 or more files have the same content. I assumed that this bot will do the same, but this is not the case. The bot will only prevent duplicates that have the same name and same content, but will let pass the files with different names and same content.

The file_unique_id is not suitable for preventing duplicates (same content), only prevents duplicates with same file names and same content. You can check for yourself. Create 2 identical text files (same name and same content, check md5 hashes to be sure).

Upload them to @RawDataBot and check file_unique_id. It will be the same because files have the same name and the same content.

Now keep the same content, only rename files differently. Upload them to @RawDataBot and check their file_unique_id. It will be different, even if the files have the same content.

So the bot can only prevent duplicates in a limited case, when files have the same name and content. It will not prevent duplicates that have same content and different names. This should be made clear, so the users understand the limits of this bot.

I'm wonder if there is another method to prevent duplicates. You know if Telegram stores the md5 hashes for files? It will be useful to use them to prevent duplicates.

@m4mallu
Copy link
Owner

m4mallu commented Dec 8, 2022

As I already stated in the final release of this version, there will be some serious changes in this repo. The same will be considered in another repo that is doing this specific function.

@art435
Copy link
Author

art435 commented Dec 8, 2022

I will wait for new version. I hope that all shortcomings will be resolved. Thank you and have a nice day!

@m4mallu m4mallu closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants