Rename ContactType to EmbeddedContactType
This commit is contained in:
parent
017a0fa807
commit
fe040a2873
16 changed files with 46 additions and 42 deletions
|
@ -4,7 +4,7 @@
|
|||
import { format as formatPhoneNumber } from './PhoneNumber';
|
||||
import { AttachmentType } from './Attachment';
|
||||
|
||||
export type ContactType = {
|
||||
export type EmbeddedContactType = {
|
||||
name?: Name;
|
||||
number?: Array<Phone>;
|
||||
email?: Array<Email>;
|
||||
|
@ -68,15 +68,15 @@ type Avatar = {
|
|||
isProfile: boolean;
|
||||
};
|
||||
|
||||
export function contactSelector(
|
||||
contact: ContactType,
|
||||
export function embeddedContactSelector(
|
||||
contact: EmbeddedContactType,
|
||||
options: {
|
||||
regionCode: string;
|
||||
firstNumber?: string;
|
||||
isNumberOnSignal?: boolean;
|
||||
getAbsoluteAttachmentPath: (path: string) => string;
|
||||
}
|
||||
): ContactType {
|
||||
): EmbeddedContactType {
|
||||
const {
|
||||
getAbsoluteAttachmentPath,
|
||||
firstNumber,
|
||||
|
@ -117,7 +117,7 @@ export function contactSelector(
|
|||
};
|
||||
}
|
||||
|
||||
export function getName(contact: ContactType): string | undefined {
|
||||
export function getName(contact: EmbeddedContactType): string | undefined {
|
||||
const { name, organization } = contact;
|
||||
const displayName = (name && name.displayName) || undefined;
|
||||
const givenName = (name && name.givenName) || undefined;
|
|
@ -4,7 +4,7 @@
|
|||
/* eslint-disable camelcase */
|
||||
|
||||
import { AttachmentType } from './Attachment';
|
||||
import { ContactType } from './Contact';
|
||||
import { EmbeddedContactType } from './EmbeddedContact';
|
||||
import { IndexableBoolean, IndexablePresence } from './IndexedDB';
|
||||
|
||||
export type Message = (
|
||||
|
@ -110,7 +110,7 @@ type MessageSchemaVersion5 = Partial<
|
|||
|
||||
type MessageSchemaVersion6 = Partial<
|
||||
Readonly<{
|
||||
contact: Array<ContactType>;
|
||||
contact: Array<EmbeddedContactType>;
|
||||
}>
|
||||
>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue