xabber-web icon indicating copy to clipboard operation
xabber-web copied to clipboard

Update contacts.js

Open karmac2015 opened this issue 4 years ago • 2 comments

change the regular expression in 'addContact' function to the same regular expression used in 'checkJid' function, to solve the problem of adding contact like the following: '[email protected]' (x.x.x.x = IP address).

karmac2015 avatar Dec 24 '19 07:12 karmac2015

@karmac2015 you are not meant to use IP addresses in XMPP IDs. Your IP does not belong to you, in might change on your ISP's whim, and everyone will not be able to contact you. That's why you should always use your own domain for your server.

andrewnenakhov avatar Dec 24 '19 11:12 andrewnenakhov

It is useful when trying to test the app on my own local server and I want to use an IP address instead of domain name.

Why in 'checkJid' function the regular expression allows using jid with IP address, but in 'addContact' function doesn't allow ?

karmac2015 avatar Dec 24 '19 11:12 karmac2015