mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-02 16:23:20 +01:00
18 lines
482 B
TypeScript
18 lines
482 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(
|
|
attrs: Pick<
|
|
ConversationAttributesType,
|
|
'draft' | 'draftAttachments' | 'quotedMessageId'
|
|
>
|
|
): boolean {
|
|
return (
|
|
(attrs.draft != null && attrs.draft.length > 0) ||
|
|
(attrs.draftAttachments != null && attrs.draftAttachments.length > 0) ||
|
|
attrs.quotedMessageId != null
|
|
);
|
|
}
|