Migrate schema to service ids
This commit is contained in:
parent
71958f8a01
commit
8b0da36caa
258 changed files with 4795 additions and 2613 deletions
|
@ -12,8 +12,8 @@ export function validateConversation(
|
|||
return `Invalid conversation type: ${attributes.type}`;
|
||||
}
|
||||
|
||||
if (!attributes.e164 && !attributes.uuid && !attributes.groupId) {
|
||||
return 'Missing one of e164, uuid, or groupId';
|
||||
if (!attributes.e164 && !attributes.serviceId && !attributes.groupId) {
|
||||
return 'Missing one of e164, serviceId, or groupId';
|
||||
}
|
||||
|
||||
const error = validateNumber(attributes) || validateServiceId(attributes);
|
||||
|
@ -41,8 +41,8 @@ function validateNumber(attributes: ValidateConversationType): string | null {
|
|||
function validateServiceId(
|
||||
attributes: ValidateConversationType
|
||||
): string | null {
|
||||
if (isDirectConversation(attributes) && attributes.uuid) {
|
||||
if (isServiceIdString(attributes.uuid)) {
|
||||
if (isDirectConversation(attributes) && attributes.serviceId) {
|
||||
if (isServiceIdString(attributes.serviceId)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue