Page MenuHomePhabricator

D5197.diff
No OneTemporary

D5197.diff

diff --git a/lib/shared/messages/multimedia-message-spec.js b/lib/shared/messages/multimedia-message-spec.js
--- a/lib/shared/messages/multimedia-message-spec.js
+++ b/lib/shared/messages/multimedia-message-spec.js
@@ -25,6 +25,7 @@
import type {
MediaMessageData,
MediaMessageInfo,
+ MediaMessageServerDBContent,
RawMediaMessageInfo,
} from '../../types/messages/media';
import type { RawUnsupportedMessageInfo } from '../../types/messages/unsupported';
@@ -60,6 +61,22 @@
| RawMediaMessageInfo
| RawImagesMessageInfo,
): string {
+ if (data.type === messageTypes.MULTIMEDIA) {
+ const mediaMessageContents: $ReadOnlyArray<MediaMessageServerDBContent> = data.media.map(
+ media => {
+ if (media.type === 'photo') {
+ return { type: 'photo', uploadID: media.id };
+ } else {
+ return {
+ type: 'video',
+ uploadID: media.id,
+ thumbnailUploadID: media.thumbnailID,
+ };
+ }
+ },
+ );
+ return JSON.stringify(mediaMessageContents);
+ }
const mediaIDs = data.media.map(media => parseInt(media.id, 10));
return JSON.stringify(mediaIDs);
},

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 6:51 AM (18 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2569517
Default Alt Text
D5197.diff (1 KB)

Event Timeline