From 40d6ade8b68ee444e7a233ab98cb835f983009a1 Mon Sep 17 00:00:00 2001 From: John Livingston Date: Sat, 20 Feb 2021 23:29:07 +0100 Subject: [PATCH] Look & feel for builtin chat. --- CHANGELOG.md | 6 ++++++ conversejs/builtin.js | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca5261b0..8a90c602 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v??? + +### Features + +* Optional Builtin ConverseJS + ## v0.0.8 ### Features diff --git a/conversejs/builtin.js b/conversejs/builtin.js index 6881319f..be7b9cf3 100644 --- a/conversejs/builtin.js +++ b/conversejs/builtin.js @@ -1,3 +1,11 @@ +function inIframe () { + try { + return window.self !== window.top + } catch (e) { + return true + } +} + window.initConverse = function initConverse ({ jid, assetsPath, @@ -22,7 +30,7 @@ window.initConverse = function initConverse ({ ], singleton: true, auto_focus: false, - hide_muc_participants: false, + hide_muc_participants: inIframe, keepalive: true, play_sounds: false, muc_mention_autocomplete_min_chars: 3,