Hide Save in message selection for protected messages
Ric committed
- Author
- Ric · 61457974+dallo28@users.noreply.github.comOct 21, 2026 at 21:00
- Committer
- Ric · 61457974+dallo28@users.noreply.github.comOct 21, 2026 at 21:00
- Parents
- 0aae959806c5
Hide Save in message selection for protected messages When messages are selected, the action bar shows "Save to Music" / "Save to Downloads" for music and documents. Whether a selected message counts as saveable was decided by isPeerNoForwards() alone, i.e. only the chat-wide restriction. The per-message noforwards flag, which is what a bot's protect_content sets, was ignored, so a protected audio or document received from a bot could be long-pressed and saved to the device. Photos and videos were not affected because the selection bar never offers to save them, and the single-message menu already checks both flags. Saveability is now decided by canSaveSelectedMessage(), which checks the chat-wide restriction, the message's own noforwards flag and the existing view-once exclusions. Selecting and deselecting a message both use it; previously the deselect path skipped the view-once checks, so the save counters could get out of sync. Fixes https://bugs.telegram.org/c/66929
1 file changed+8−4