Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3244112
D5058.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
D5058.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D5058: [keyserver] Update `sendMultimediaMsgReqInpValidator` to accept list of `mediaMessageContents` in addition to `mediaIDs`
Attached
Detach File
Event Timeline
Log In to Comment