Skip edit step when forwarding a voice message
This commit is contained in:
parent
129057df84
commit
703a82c818
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
import { orderBy } from 'lodash';
|
||||
import type { AttachmentType } from '../types/Attachment';
|
||||
import { isVoiceMessage } from '../types/Attachment';
|
||||
import type { LinkPreviewType } from '../types/message/LinkPreviews';
|
||||
import type { MessageAttributesType, QuotedMessageType } from '../model-types';
|
||||
import * as log from '../logging/log';
|
||||
|
@ -46,6 +47,10 @@ export function isDraftEditable(draft: MessageForwardDraft): boolean {
|
|||
if (draft.hasContact) {
|
||||
return false;
|
||||
}
|
||||
const hasVoiceMessage = draft.attachments?.some(isVoiceMessage) ?? false;
|
||||
if (hasVoiceMessage) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue