Skip to content

Commit

Permalink
Merge pull request #369 from wazo-platform/new-dnd
Browse files Browse the repository at this point in the history
DND / Presential changes
  • Loading branch information
manuquentin authored Aug 25, 2020
2 parents 90703f5 + 6f76990 commit ef9c621
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/domain/Contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ type ContactArguments = {
status?: string,
backend?: string,
personalStatus?: string,
sessions?: Array<{ uuid: string, mobile: boolean}>
sessions?: Array<{ uuid: string, mobile: boolean}>,
doNotDisturb?: boolean,
};

type Office365Response = {
Expand Down Expand Up @@ -246,6 +247,7 @@ export default class Contact {
backend: ?string;
personalStatus: string;
sessions: ?Array<{ uuid: string, mobile: boolean}>;
doNotDisturb: ?boolean;

static merge(oldContacts: Array<Contact>, newContacts: Array<Contact>): Array<Contact> {
return newContacts.map(current => {
Expand Down Expand Up @@ -525,6 +527,7 @@ export default class Contact {
backend,
personalStatus,
sessions,
doNotDisturb,
}: ContactArguments = {}) {
this.id = id;
this.uuid = uuid;
Expand All @@ -550,6 +553,7 @@ export default class Contact {
this.backend = backend;
this.personalStatus = personalStatus || '';
this.sessions = sessions || [];
this.doNotDisturb = doNotDisturb;

// Useful to compare instead of instanceof with minified code
this.type = 'Contact';
Expand Down

0 comments on commit ef9c621

Please sign in to comment.