mattermost-mobile-upstream/app
Mattermost Build c1afd62681
[MM-69129] Prevent crash on nameless attachment (#10091) (#10126)
* [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 06:36:24 +00:00
..
actions Guard long-running DB chains against RUNNINGBOARD 0xdead10cc on iOS (#10110) (#10133) 2026-09-07 08:26:32 +03:00
client [MM-68986][MM-69203] Add module to collect Session Attributes from Mobile App (#9830) (#10073) 2026-08-18 14:05:37 -04:00
components [MM-69129] Prevent crash on nameless attachment (#10091) (#10126) 2026-09-07 06:36:24 +00:00
constants [MM-70388] Request location permission for the SSID session attribute (#10100) (#10104) 2026-08-28 19:58:17 +00:00
context Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
database perf: skip Android Keystore listing on cold start (#10056) (#10137) 2026-09-07 09:00:24 +03:00
helpers Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
hooks MM-70051 Fixing issues with system classifications (#9989) 2026-08-11 11:17:39 +03:00
i18n Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
init perf: skip Android Keystore listing on cold start (#10056) (#10137) 2026-09-07 09:00:24 +03:00
keyboard resumes slide animation after stopping due to modal system dialog showing (#9792) 2026-05-29 06:50:57 +08:00
managers On iOS, resuming after the 5-minute window showed no biometric prompt — (#10102) (#10132) 2026-09-07 08:26:21 +03:00
products replace react-native-incall-manager with @mattermost/calls-native for audio management (#9973) 2026-08-06 07:38:54 +08:00
queries Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
routes Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
screens MM-70051 Fixing issues with system classifications (#9989) 2026-08-11 11:17:39 +03:00
store Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
utils [MM-69129] Prevent crash on nameless attachment (#10091) (#10126) 2026-09-07 06:36:24 +00:00