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

Update contacts.js #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

karmac2015
Copy link

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).

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).
@andrewnenakhov
Copy link
Member

@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.

@karmac2015
Copy link
Author

karmac2015 commented Dec 24, 2019

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants