diff options
| author | Georg Lukas <georg@op-co.de> | 2017-01-05 12:09:25 +0100 |
|---|---|---|
| committer | Georg Lukas <georg@op-co.de> | 2017-01-05 12:09:25 +0100 |
| commit | d4551bb4fa008351d901fe6c5453735a1d2edecf (patch) | |
| tree | 466cf1ca95ed9092c0a64de9aee361d1ed437c2d | |
| parent | acf401f44b75771f659931d3e177a6addae6a545 (diff) | |
| download | php-xmpp-invitation-d4551bb4fa008351d901fe6c5453735a1d2edecf.tar.gz | |
Support base64-encoded JIDs, added for ChatSecure
| -rw-r--r-- | index.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/index.html b/index.html index f8b9baf..7b10278 100644 --- a/index.html +++ b/index.html @@ -47,6 +47,13 @@ function load_hash() { key_prefix = "chat."; var jid = window.location.search || window.location.hash; jid = decodeURIComponent(jid.substring(jid.indexOf('#') + 1, jid.length)); + try { + base_decoded = window.atob(jid); + if (base_decoded.search('@') >= 0) + jid = base_decoded; + } catch (err) { + // ignore error, JID wasn't base64 encoded + } if (jid.search("\\?join") >= 0) { muc = true; key_prefix = "muc."; |
