Make most message attribute uses readonly

Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
Fedor Indutny 2024-07-24 13:14:11 -07:00 committed by GitHub
parent c619a7b6fd
commit 3555ccc629
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
53 changed files with 342 additions and 258 deletions

View file

@ -3,13 +3,13 @@
import type {
ConversationAttributesType,
MessageAttributesType,
ReadonlyMessageAttributesType,
} from '../model-types.d';
import { isIncoming, isOutgoing } from '../state/selectors/message';
import { getTitle } from './getTitle';
function getIncomingContact(
messageAttributes: MessageAttributesType
messageAttributes: ReadonlyMessageAttributesType
): ConversationAttributesType | undefined {
if (!isIncoming(messageAttributes)) {
return undefined;
@ -24,7 +24,7 @@ function getIncomingContact(
}
export function getMessageAuthorText(
messageAttributes?: MessageAttributesType
messageAttributes?: ReadonlyMessageAttributesType
): string | undefined {
if (!messageAttributes) {
return undefined;