Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3521219
D5061.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
D5061.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
@@ -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
Details
Attached
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)
Attached To
Mode
D5061: [lib] Update `SendMultimediaMessageRequest` type
Attached
Detach File
Event Timeline
Log In to Comment