From 6e37fe175d6c2111a6d2cbc758655264c8fcc147 Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 23 Aug 2017 13:41:55 -0500 Subject: [PATCH] Skips showing empty statuses. Updates poltergeist to report connected. --- modules/UI/UI.js | 4 ++++ resources/prosody-plugins/mod_muc_poltergeist.lua | 3 +++ 2 files changed, 7 insertions(+) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 9a39b85b2..36197f98e 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -536,6 +536,10 @@ UI.updateUserRole = user => { * @param {string} status - The new status. */ UI.updateUserStatus = (user, status) => { + if (!status) { + return; + } + let displayName = user.getDisplayName(); messageHandler.participantNotification( displayName, '', 'connected', "dialOut.statusMessage", diff --git a/resources/prosody-plugins/mod_muc_poltergeist.lua b/resources/prosody-plugins/mod_muc_poltergeist.lua index 2078e7495..8e59d0c4a 100644 --- a/resources/prosody-plugins/mod_muc_poltergeist.lua +++ b/resources/prosody-plugins/mod_muc_poltergeist.lua @@ -181,6 +181,9 @@ prosody.events.add_handler("pre-jitsi-authentication", function(session) -- we will mark it with ignore tag local nick = string.sub(username, 0, 8); if (have_poltergeist_occupant(room, nick)) then + -- notify that user connected using the poltergeist + update_poltergeist_occupant_status( + room, nick, "connected"); remove_poltergeist_occupant(room, nick, true); end