mattermost-mobile-upstream/app/components/post_draft
Mattermost Build d9df0cdf3e
[MM-69129] Prevent crash on nameless attachment (#10091) (#10134)
* [MM-69129] Prevent crash on nameless attachment.

A draft attachment persisted without a name or an extension made
`isImage` call `extractExtension(undefined)`, throwing on every render of
the channel and of the global Drafts screen. Guard against it so the
draft renders as a plain file card that the user can remove.

* [MM-69129] Exercise the upload item tests against the real file utils

Both suites stubbed `isImage` and `getFormattedFileSize`, which are pure
functions, so they asserted states the component can never see and could
not have caught this crash. Drop the mocks and let each fixture decide
which branch renders.

(cherry picked from commit 876af76f36)

Co-authored-by: Jesse Hallam <jesse@thehallams.ca>
2026-09-07 08:26:41 +03:00
..
archived Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
custom_emoji_picker Mattermost Blocks (#9764) 2026-06-29 18:42:16 +02:00
draft_handler Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
draft_input Revert "e2e(detox): Rainforest to Detox migration (#9790)" (#9834) 2026-06-15 17:57:01 +02:00
post_input fix: hardware Enter key not sending messages in channel on iPad (#9965) (#9998) 2026-08-05 08:09:53 +03:00
quick_actions Revert "e2e(detox): Rainforest to Detox migration (#9790)" (#9834) 2026-06-15 17:57:01 +02:00
read_only Fix more messages indicator on read only channels (#8652) 2025-03-11 07:32:22 +08:00
send_button Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
send_handler Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
status_indicator feat: AI rewrite (#9280) 2026-02-16 16:48:57 +01:00
typing Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
uploads [MM-69129] Prevent crash on nameless attachment (#10091) (#10134) 2026-09-07 08:26:41 +03:00
index.ts fix: app bugs surfaced by Detox RF migration (#9789) 2026-06-09 13:25:42 +05:30
post_draft.tsx Fixes autocomplete, bad ssl message on android and edit post (#9799) 2026-06-01 23:21:29 +08:00