Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3345752
D5197.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5197.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5197: [lib] Implement `messageContentForServerDB` for `messageTypes.MULTIMEDIA`
Attached
Detach File
Event Timeline
Log In to Comment