From 897145be5ebab097b06c7bb20f6d2996c8209b4e Mon Sep 17 00:00:00 2001 From: Georg Lukas Date: Fri, 20 Apr 2018 21:10:06 +0200 Subject: JID parser: fall back to the full string if it doesn't contain '@', thx iBrek and iNPUTmice --- scripts/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/main.js') 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); -- cgit 1.4.1