2023-06-02 13:54:36 -04:00
|
|
|
// Copyright 2023 Signal Messenger, LLC
|
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
2025-09-16 17:39:03 -07:00
|
|
|
import type { ConversationAttributesType } from '../model-types.js';
|
2023-06-02 13:54:36 -04:00
|
|
|
|
|
|
|
|
export function hasDraft(attributes: ConversationAttributesType): boolean {
|
|
|
|
|
const draftAttachments = attributes.draftAttachments || [];
|
|
|
|
|
|
|
|
|
|
return (attributes.draft ||
|
|
|
|
|
attributes.quotedMessageId ||
|
|
|
|
|
draftAttachments.length > 0) as boolean;
|
|
|
|
|
}
|