XMPP invitation landing page, without javascript
JID parser: fall back to the full string if it doesn't contain '@', thx iBrek and iNPUTmice
Georg Lukas 2018-04-20
parent eee204e · commit 897145b
-rw-r--r--scripts/main.js2
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);