diff options
| author | Georg Lukas <georg@op-co.de> | 2018-04-20 21:10:06 +0200 |
|---|---|---|
| committer | Georg Lukas <georg@op-co.de> | 2018-04-20 21:10:06 +0200 |
| commit | 897145be5ebab097b06c7bb20f6d2996c8209b4e (patch) | |
| tree | cb7aa7359b8a546f0a07c6d9267587bf2200107c /scripts/main.js | |
| parent | eee204e54b01a88e64bd6a900687d72c8eedb17f (diff) | |
| download | php-xmpp-invitation-897145be5ebab097b06c7bb20f6d2996c8209b4e.tar.gz | |
JID parser: fall back to the full string if it doesn't contain '@', thx iBrek and iNPUTmice
Diffstat (limited to 'scripts/main.js')
| -rw-r--r-- | scripts/main.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/main.js b/scripts/main.js index 2cb124c..7f9bc8d 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -49,7 +49,7 @@ } // TODO: proper error checking / display / Creation of invitations - if (jid.search("@") <= 0) return {jid:"", name: "Somebody"}; + if (jid.search("@") <= 0) return {jid:jid, jid_encoded:jid, name: jid}; var name = jid.split("@")[0]; name = name.charAt(0).toUpperCase() + name.slice(1); |
