Replace MessageModel#isUnread with isMessageUnread utility

This commit is contained in:
Evan Hahn 2021-07-29 09:29:07 -05:00 committed by GitHub
parent 0acefaa656
commit 8cadc40975
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 16 deletions

View file

@ -0,0 +1,8 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import type { MessageAttributesType } from '../model-types.d';
export const isMessageUnread = (
message: Readonly<Pick<MessageAttributesType, 'unread'>>
): boolean => Boolean(message.unread);