Skip to content

Allow copying own text messages when content protection is enabled - #1987

Open
ArtinEB wants to merge 1 commit into
DrKLO:masterfrom
ArtinEB:allow-copy-own-messages-noforwards
Open

Allow copying own text messages when content protection is enabled#1987
ArtinEB wants to merge 1 commit into
DrKLO:masterfrom
ArtinEB:allow-copy-own-messages-noforwards

Conversation

@ArtinEB

@ArtinEB ArtinEB commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • When a chat/user has "restrict saving content" enabled, the Copy option is currently hidden for every message, including ones the current user authored themselves.
  • The only way to get your own text out in that situation was an inconsistent workaround: tap Edit on the message and copy the text from the input field, which was never subject to the same restriction.
  • This adds an isOutOwner() exception to the Copy gating in the single-message long-press menu and the multi-select action bar, so the message's author can copy their own text/caption directly.

What is NOT changed

  • Forwarding and media saving remain fully restricted for everyone (untouched).
  • Copy remains hidden for messages authored by other users/channels.
  • Only text-ish content types are affected (text, caption, dice, animated emoji) — matching the existing Copy conditions.

Test plan

  • In a group/channel with "restrict saving content" enabled, long-press your own text message → Copy is visible and copies the text.
  • Long-press another user's message in the same chat → Copy is still hidden.
  • Multi-select (select several of your own text messages) → Copy button in the action bar appears and copies them.
  • Multi-select mixing your own and others' messages → only your own messages are copied.
  • Forward and Save-to-gallery/document remain disabled everywhere in the restricted chat.

Chats/users with "restrict saving content" enabled hid the Copy option
for every message, including ones the user authored themselves. Since
the author already knows their own text, the only effect was pushing
users toward an inconsistent workaround: opening Edit on the message
and copying the text out of the input field, which was never subject
to the same restriction.

Add an isOutOwner() exception to the Copy gating in the single-message
long-press menu and the multi-select toolbar/action bar, so a message's
author can copy their own text/caption directly. Forwarding and media
saving remain fully restricted for everyone, and Copy is still hidden
for messages authored by others.
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

Successfully merging this pull request may close these issues.

1 participant