Page MenuHomePhabricator

D4123.diff
No OneTemporary

D4123.diff

diff --git a/lib/media/file-utils.js b/lib/media/file-utils.js
--- a/lib/media/file-utils.js
+++ b/lib/media/file-utils.js
@@ -33,7 +33,9 @@
serverTranscodesImage: true,
},
'image/gif': {
- mediaType: 'photo_or_video',
+ // Set mediaType to 'photo_or_video' when working on
+ // video messages to treat animated GIFs as videos.
+ mediaType: 'photo',
extension: 'gif',
serverCanHandle: true,
serverTranscodesImage: true,
diff --git a/native/media/media-gallery-keyboard.react.js b/native/media/media-gallery-keyboard.react.js
--- a/native/media/media-gallery-keyboard.react.js
+++ b/native/media/media-gallery-keyboard.react.js
@@ -189,7 +189,9 @@
} = await MediaLibrary.getAssetsAsync({
first: 20,
after,
- mediaType: [MediaLibrary.MediaType.photo, MediaLibrary.MediaType.video],
+ // Include `MediaLibrary.MediaType.video` in `mediaType` array
+ // when working on video messages so videos show up in media gallery.
+ mediaType: [MediaLibrary.MediaType.photo],
sortBy: [MediaLibrary.SortBy.modificationTime],
});

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 8:21 AM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2519927
Default Alt Text
D4123.diff (1 KB)

Event Timeline