The Telegram Bot API's protect_content parameter is documented as preventing messages from being forwarded or saved. However, this protection works for messages sent using sendPhoto and sendVideo, but does not appear to work for files sent using sendAudio and sendDocument.
When protect_content=true is set, users can still long-press audio files or documents on Android and save them to the device using the available save option.
Tested file formats:
FLAC (50 MB) and MP3 (10 MB): can be saved.
PDF (5 MB) and ZIP (20 MB): can be saved.
MP4 (50 MB) and JPG (5 MB): saving is correctly blocked.
Additionally, audio files remain accessible in the Android application cache after the message is deleted, at: /storage/emulated/0/Android/data/org.telegram.messenger/files/Telegram/Telegram Audio/
This creates an inconsistency in content protection across different media types.
Note: It is unclear whether this behavior is intentional. If it is intentional, the Bot API documentation should clarify that protect_content does not prevent saving audio files and documents on Android.
Steps to reproduce
Open Telegram on Android.
Send an audio file to a bot that uses sendAudio with protect_content=true.
Long-press the received audio file.
Tap Save to Downloads.
Verify that the file is saved successfully to /storage/emulated/0/Download/Telegram/.
Repeat the test with a document sent using sendDocument and protect_content=true.
Verify that the document can also be saved to the device.
Repeat the test with a video sent using sendVideo and protect_content=true.
Long-press the received video and verify that Save to Gallery is disabled.
Current result
Audio files and documents sent with protect_content=true can still be saved to the device on Android. Audio files may also remain accessible in the application cache after the corresponding message is deleted.
Videos and photos with the same protection setting correctly restrict saving.
I think this needs to be fixed. Even when content protection is enabled, audio files and documents can still be saved on Android. Please look into this issue and fix it. It would be great if the protection worked properly for all types of media.
Please fix this bug as soon as possible