Make most message attribute uses readonly
Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
parent
c619a7b6fd
commit
3555ccc629
53 changed files with 342 additions and 258 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue