Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Add Aselo Connector support for getProfileFlagsForIdentifier #741

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion functions/getProfileFlagsForIdentifier.protected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@

type TransformIdentifierFunction = (c: string) => string;
const channelTransformations: { [k: string]: TransformIdentifierFunction[] } = {
voice: [trimSpaces],
// If the Aselo Connector is being used, we might get a voice From that looks like
// 'sip:[email protected]'. This regexp should normalize the string.
voice: [(s) => s.includes('sip:') ? s.match(/sip:([^\@]+)/)?.[1] || '' : s, trimSpaces],

Check failure on line 80 in functions/getProfileFlagsForIdentifier.protected.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Arrow function used ambiguously with a conditional expression

Check failure on line 80 in functions/getProfileFlagsForIdentifier.protected.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Replace `s.includes('sip:')·?·s.match(/sip:([^\@]+)/)?.[1]·||·''·:·s` with `(s.includes('sip:')·?·s.match(/sip:([^\@]+)/)?.[1]·||·''·:·s)`

Check failure on line 80 in functions/getProfileFlagsForIdentifier.protected.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Unnecessary escape character: \@
sms: [trimSpaces],
whatsapp: [(s) => s.replace('whatsapp:', ''), trimSpaces],
modica: [(s) => s.replace('modica:', ''), trimSpaces],
Expand Down
Loading