Reverse changes to contact.js

pull/61/head
Mikunj 7 years ago
parent b929b11f07
commit f7e9af4e3a

@ -66,7 +66,7 @@ function idForLogging(message) {
exports._validate = (contact, options = {}) => { exports._validate = (contact, options = {}) => {
const { messageId } = options; const { messageId } = options;
const { name, organization } = contact; const { name, number, email, address, organization } = contact;
if ((!name || !name.displayName) && !organization) { if ((!name || !name.displayName) && !organization) {
return new Error( return new Error(
@ -74,16 +74,15 @@ exports._validate = (contact, options = {}) => {
); );
} }
// Disabled as we don't require the users to provide this if (
// if ( (!number || !number.length) &&
// (!number || !number.length) && (!email || !email.length) &&
// (!email || !email.length) && (!address || !address.length)
// (!address || !address.length) ) {
// ) { return new Error(
// return new Error( `Message ${messageId}: Contact had no included numbers, email or addresses`
// `Message ${messageId}: Contact had no included numbers, email or addresses` );
// ); }
// }
return null; return null;
}; };

Loading…
Cancel
Save