Allow stage and send of video, even if we can't get screenshot

This commit is contained in:
Scott Nonnenberg 2021-11-15 13:54:33 -08:00 committed by GitHub
parent 117cb074c7
commit a024ee4b96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 224 additions and 143 deletions

View file

@ -4,7 +4,7 @@
import type { ThunkAction } from 'redux-thunk';
import * as log from '../../logging/log';
import type { AttachmentType } from '../../types/Attachment';
import type { InMemoryAttachmentDraftType } from '../../types/Attachment';
import { SignalService as Proto } from '../../protobuf';
import type { StateType as RootStateType } from '../reducer';
import { fileToBytes } from '../../util/fileToBytes';
@ -129,7 +129,7 @@ function completeRecordingAction(): CompleteRecordingAction {
function completeRecording(
conversationId: string,
onSendAudioRecording?: (rec: AttachmentType) => unknown
onSendAudioRecording?: (rec: InMemoryAttachmentDraftType) => unknown
): ThunkAction<
void,
RootStateType,
@ -158,7 +158,8 @@ function completeRecording(
}
const data = await fileToBytes(blob);
const voiceNoteAttachment = {
const voiceNoteAttachment: InMemoryAttachmentDraftType = {
pending: false,
contentType: stringToMIMEType(blob.type),
data,
size: data.byteLength,