Page MenuHomePhabricator

D5058.diff
No OneTemporary

D5058.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
@@ -16,7 +16,7 @@
import type { TextMessageData } from 'lib/types/messages/text';
import { threadPermissions } from 'lib/types/thread-types';
import { ServerError } from 'lib/utils/errors';
-import { tShape } from 'lib/utils/validation-utils';
+import { tShape, tMediaMessageMedia } from 'lib/utils/validation-utils';
import createMessages from '../creators/message-creator';
import {
@@ -89,11 +89,18 @@
return { ...response, userInfos: {} };
}
-const sendMultimediaMessageRequestInputValidator = tShape({
- threadID: t.String,
- localID: t.String,
- mediaIDs: t.list(t.String),
-});
+const sendMultimediaMessageRequestInputValidator = t.union([
+ tShape({
+ threadID: t.String,
+ localID: t.String,
+ mediaIDs: t.list(t.String),
+ }),
+ tShape({
+ threadID: t.String,
+ localID: t.String,
+ mediaMessageContents: t.list(tMediaMessageMedia),
+ }),
+]);
async function multimediaMessageCreationResponder(
viewer: Viewer,
input: any,

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 15, 11:13 AM (17 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2494169
Default Alt Text
D5058.diff (1 KB)

Event Timeline