code review changes
This commit is contained in:
parent
ae21a09bd6
commit
f99c919416
|
@ -44,7 +44,7 @@ export const OUTGOING_CALL_RINGING_SOUND_ID = 'OUTGOING_CALL_RINGING_SOUND_ID';
|
||||||
export const OUTGOING_CALL_START_SOUND_ID = 'OUTGOING_CALL_START_SOUND_ID';
|
export const OUTGOING_CALL_START_SOUND_ID = 'OUTGOING_CALL_START_SOUND_ID';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regex for matching email addresses.
|
* Regex for matching sip addresses.
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
export const EMAIL_ADDRESS_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
export const SIP_ADDRESS_REGEX = /^[a-zA-Z]+(?:([^\s>:@]+)(?::([^\s@>]+))?@)?([\w\-.]+)(?::(\d+))?((?:;[^\s=?>;]+(?:=[^\s?;]+)?)*)(?:\?(([^\s&=>]+=[^\s&=>]+)(&[^\s&=>]+=[^\s&=>]+)*))?$/;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { toState } from '../base/redux';
|
||||||
import { doGetJSON, parseURIString } from '../base/util';
|
import { doGetJSON, parseURIString } from '../base/util';
|
||||||
import { isVpaasMeeting } from '../billing-counter/functions';
|
import { isVpaasMeeting } from '../billing-counter/functions';
|
||||||
|
|
||||||
import { EMAIL_ADDRESS_REGEX } from './constants';
|
import { SIP_ADDRESS_REGEX } from './constants';
|
||||||
import logger from './logger';
|
import logger from './logger';
|
||||||
|
|
||||||
declare var $: Function;
|
declare var $: Function;
|
||||||
|
@ -428,7 +428,7 @@ function isMaybeAPhoneNumber(text: string): boolean {
|
||||||
* @returns {boolean} True if provided text matches a sip address format.
|
* @returns {boolean} True if provided text matches a sip address format.
|
||||||
*/
|
*/
|
||||||
function isASipAddress(text: string): boolean {
|
function isASipAddress(text: string): boolean {
|
||||||
return EMAIL_ADDRESS_REGEX.test(text);
|
return SIP_ADDRESS_REGEX.test(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -807,7 +807,7 @@ export function isSharingEnabled(sharingFeature: string) {
|
||||||
/**
|
/**
|
||||||
* Sends a post request to an invite service.
|
* Sends a post request to an invite service.
|
||||||
*
|
*
|
||||||
* @param {Immutable.List} inviteItems - The list of the "sip" type items to invite.
|
* @param {Array} inviteItems - The list of the "sip" type items to invite.
|
||||||
* @param {string} sipInviteUrl - The invite service that generates the invitation.
|
* @param {string} sipInviteUrl - The invite service that generates the invitation.
|
||||||
* @param {string} jwt - The jwt token.
|
* @param {string} jwt - The jwt token.
|
||||||
* @param {string} roomName - The name to the conference.
|
* @param {string} roomName - The name to the conference.
|
||||||
|
|
Loading…
Reference in New Issue