Page MenuHomePhabricator

D5061.id16535.diff
No OneTemporary

D5061.id16535.diff

diff --git a/keyserver/src/responders/message-responders.js b/keyserver/src/responders/message-responders.js
--- a/keyserver/src/responders/message-responders.js
+++ b/keyserver/src/responders/message-responders.js
@@ -118,6 +118,7 @@
viewer: Viewer,
request: SendMultimediaMessageRequest,
): Promise<SendMessageResponse> {
+ invariant(request.mediaIDs, 'request.mediaIDs should be set');
const { threadID, localID, mediaIDs } = request;
if (mediaIDs.length === 0) {
throw new ServerError('invalid_parameters');
diff --git a/lib/types/message-types.js b/lib/types/message-types.js
--- a/lib/types/message-types.js
+++ b/lib/types/message-types.js
@@ -67,6 +67,7 @@
import type {
MediaMessageData,
MediaMessageInfo,
+ MediaMessageServerDBContent,
RawMediaMessageInfo,
} from './messages/media';
import type {
@@ -499,11 +500,17 @@
+localID?: string,
+text: string,
};
-export type SendMultimediaMessageRequest = {
- +threadID: string,
- +localID: string,
- +mediaIDs: $ReadOnlyArray<string>,
-};
+export type SendMultimediaMessageRequest =
+ | {
+ +threadID: string,
+ +localID: string,
+ +mediaIDs: $ReadOnlyArray<string>,
+ }
+ | {
+ +threadID: string,
+ +localID: string,
+ +mediaMessageContents: $ReadOnlyArray<MediaMessageServerDBContent>,
+ };
// Used for the message info included in log-in type actions
export type GenericMessagesResult = {

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 6:32 AM (13 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698015
Default Alt Text
D5061.id16535.diff (1 KB)

Event Timeline