signal-desktop/ts/util/isConversationMuted.ts
2023-01-03 11:55:46 -08:00

9 lines
339 B
TypeScript

// Copyright 2020 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);