signal-desktop/ts/util/isConversationMuted.ts

10 lines
344 B
TypeScript
Raw Normal View History

2022-05-23 18:37:53 +00:00
// 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);