Files
Desktop/ts/util/hasDraft.std.ts
Fedor Indutny 44076ece79 Rename files
2025-10-16 23:45:44 -07:00

13 lines
405 B
TypeScript

// Copyright 2023 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationAttributesType } from '../model-types.d.ts';
export function hasDraft(attributes: ConversationAttributesType): boolean {
const draftAttachments = attributes.draftAttachments || [];
return (attributes.draft ||
attributes.quotedMessageId ||
draftAttachments.length > 0) as boolean;
}