signal-desktop/ts/util/isConversationMuted.ts
2022-05-23 18:37:53 +00:00

9 lines
344 B
TypeScript

// Copyright 2020-2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { ConversationAttributesType } from '../model-types.d';
export const isConversationMuted = ({
muteExpiresAt,
}: Readonly<Pick<ConversationAttributesType, 'muteExpiresAt'>>): boolean =>
Boolean(muteExpiresAt && Date.now() < muteExpiresAt);