(value = '')
| 533 | } |
| 534 | |
| 535 | function normalizeMailProvider(value = '') { |
| 536 | const normalized = String(value || '').trim().toLowerCase(); |
| 537 | switch (normalized) { |
| 538 | case 'custom': |
| 539 | case ICLOUD_PROVIDER: |
| 540 | case GMAIL_PROVIDER: |
| 541 | case HOTMAIL_PROVIDER: |
| 542 | case LUCKMAIL_PROVIDER: |
| 543 | case CLOUDFLARE_TEMP_EMAIL_PROVIDER: |
| 544 | case '163': |
| 545 | case '163-vip': |
| 546 | case 'qq': |
| 547 | case 'inbucket': |
| 548 | case '2925': |
| 549 | return normalized; |
| 550 | default: |
| 551 | return PERSISTED_SETTING_DEFAULTS.mailProvider; |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | function buildLuckmailSessionSettingsPayload(input = {}) { |
| 556 | if (!input || typeof input !== 'object' || Array.isArray(input)) { |
no outgoing calls
no test coverage detected