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';
|
2021-07-29 14:29:07 +00:00
|
|
|
import type { MessageAttributesType } from '../model-types.d';
|
|
|
|
|
|
|
|
export const isMessageUnread = (
|
2021-08-12 18:15:55 +00:00
|
|
|
message: Readonly<Pick<MessageAttributesType, 'readStatus'>>
|
|
|
|
): boolean => message.readStatus === ReadStatus.Unread;
|