Skip to content

Commit

Permalink
Merge pull request #688 from techmatters/v1.19-rc-merge
Browse files Browse the repository at this point in the history
V1.19 rc merge
  • Loading branch information
stephenhand authored Sep 17, 2024
2 parents 3b21cf4 + 3c38c1b commit d59761a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/actions/custom-actions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ runs:
- name: Aselo Production release custom action
if: inputs.helpline-name == format('AS_PROD')
uses: ./.github/actions/custom-actions/aselo_production_custom
with:
account-sid: ${{ inputs.account-sid }}
- name: Aselo Staging release custom action
if: inputs.helpline-name == format('AS_STG')
uses: ./.github/actions/custom-actions/aselo_staging_custom
Expand Down
17 changes: 11 additions & 6 deletions functions/getProfileFlagsForIdentifier.protected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,19 @@ const getContactValueFromWebchat = (trigger: ChatTrigger) => {
return preEngagementData.contactIdentifier;
};

const trimSpaces = (s: string) => s.replace(' ', '');

/**
* IMPORTANT: keep up to date with flex-plugins/plugin-hrm-form/src/utils/task
*/
const trimSpaces = (s: string) => s.replaceAll(' ', '');
const trimHyphens = (s: string) => s.replaceAll('-', '');
const phoneNumberStandardization = (s: string) =>
[trimSpaces, trimHyphens].reduce((accum, f) => f(accum), s);
type TransformIdentifierFunction = (c: string) => string;
const channelTransformations: { [k: string]: TransformIdentifierFunction[] } = {
voice: [trimSpaces],
sms: [trimSpaces],
whatsapp: [(s) => s.replace('whatsapp:', ''), trimSpaces],
modica: [(s) => s.replace('modica:', ''), trimSpaces],
voice: [phoneNumberStandardization],
sms: [phoneNumberStandardization],
whatsapp: [(s) => s.replace('whatsapp:', ''), phoneNumberStandardization],
modica: [(s) => s.replace('modica:', ''), phoneNumberStandardization],
facebook: [(s) => s.replace('messenger:', '')],
instagram: [],
line: [],
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// "incremental": true, /* Enable incremental compilation */
"target": "ES2019", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"lib": ["ES2020", "DOM"], /* Specify library files to be included in the compilation. */
"lib": ["ES2021", "DOM"], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
Expand Down

0 comments on commit d59761a

Please sign in to comment.