Page MenuHomePhabricator

D5061.diff
No OneTemporary

D5061.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, 2:42 AM (19 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698015
Default Alt Text
D5061.diff (1 KB)

Event Timeline