Skip to content

Preserve extensions when sharing generic attachments - #6387

Draft
EhsanAzish80 wants to merge 1 commit into
signalapp:mainfrom
EhsanAzish80:fix/preserve-shared-attachment-extension
Draft

EhsanAzish80 wants to merge 1 commit into
signalapp:mainfrom
EhsanAzish80:fix/preserve-shared-attachment-extension

Conversation

@EhsanAzish80

Copy link
Copy Markdown

Contributor checklist

Administrative:

  • I have read the README and CONTRIBUTING.md.
  • I understand the caveats in the Pull Requests section.
  • I have verified my Contributor License Agreement status.

Testing:

  • I have reproduced the issue in the current app and recorded it.
  • I have verified the fix in the app and recorded it.
  • I have run the in-project tests and checked for regressions.
  • I have tested on iOS devices.

Commits:

  • My commit is based on the current main branch.
  • My commit is focused for review.

Description

Fixes #6232 for attachments whose MIME type is text/plain or application/octet-stream. The decrypted copy keeps the original filename extension when available, so .srt, .ipa, and .dylib files do not become .txt or .bin. Other MIME types keep the existing extension behavior.

This is narrower than #5988. #6250 addressed the same issue but was closed by the stale bot. I added regression cases for the reported extensions and for JPEG, AAC, and the no-filename fallback.

Seven standalone checks against the extracted production helper, Swift syntax parsing, and git diff --check passed. The in-project tests and an on-device export check have not run yet because this checkout lacks the Pods submodule and the local CoreSimulator is unavailable.

AI helped write the tests; I ran the standalone checks.

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.

Downloaded documents/files are incorrectly getting a .txt & .bin extension (iOS, iPadOS)

1 participant