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,8 +118,11 @@ viewer: Viewer, request: SendMultimediaMessageRequest, ): Promise { - invariant(request.mediaIDs); - const { threadID, localID, mediaIDs } = request; + const { threadID, localID } = request; + const mediaIDs = + request.mediaIDs ?? + request.mediaMessageContents.map(contents => contents.uploadID); + if (mediaIDs.length === 0) { throw new ServerError('invalid_parameters'); }