From e8e20fbf93535b30a92a0a96a58e9d4c80d3a597 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 31 Oct 2017 18:06:28 +0100 Subject: [PATCH] Make sure to emit upon reconnection --- src/converse-core.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/converse-core.js b/src/converse-core.js index da0469404..30af1154c 100755 --- a/src/converse-core.js +++ b/src/converse-core.js @@ -748,8 +748,10 @@ if (ignore_cache) { _converse.send_initial_presence = true; _converse.roster.fetchFromServer() - .then(_converse.sendInitialPresence) - .catch(_converse.sendInitialPresence); + .then(() => { + _converse.emit('rosterContactsFetched'); + _converse.sendInitialPresence(); + }).catch(_converse.sendInitialPresence); } else { _converse.rostergroups.fetchRosterGroups().then(() => { _converse.emit('rosterGroupsFetched');