Sfoglia il codice sorgente

chore: Update checkAndFormatNumber to handle carrierName in Spanish

x1ongzhu 1 anno fa
parent
commit
bbd3d52d38
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/rcs-number/helpers.ts

+ 1 - 1
src/rcs-number/helpers.ts

@@ -1,7 +1,7 @@
 import { OperatorConfig } from 'src/operator_config/entities/operator-config.entiy'
 
 export function checkAndFormatNumber(country: string, number: string, carrierName?: string) {
-    if (/no service/i.test(carrierName) || /emergency calls only/i.test(carrierName)) {
+    if (/no service/i.test(carrierName) || /emergency calls only/i.test(carrierName) || /solo llamadas de emergencia/i.test(carrierName)) {
         throw new Error('Error carrierName')
     }
     switch (country.toLowerCase()) {