2021-07-29 14:29:07 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2021-08-12 18:15:55 +00:00
|
|
|
import { ReadStatus } from '../messages/MessageReadStatus';
|
2024-07-24 20:14:11 +00:00
|
|
|
import type { ReadonlyMessageAttributesType } from '../model-types.d';
|
2021-07-29 14:29:07 +00:00
|
|
|
|
|
|
|
export const isMessageUnread = (
|
2024-07-24 20:14:11 +00:00
|
|
|
message: Pick<ReadonlyMessageAttributesType, 'readStatus'>
|
2021-08-12 18:15:55 +00:00
|
|
|
): boolean => message.readStatus === ReadStatus.Unread;
|