diff --git a/changelog.html b/changelog.html
index 9784683d7..8315e9d79 100644
--- a/changelog.html
+++ b/changelog.html
@@ -46,6 +46,7 @@
4.5.0 -- tbd
+ - [#48] - Converse end-user UI does not get notified of rejection.
- [#47] - Fix ChatBot's rejection message.
- [#46] - Allow workgroup's chatbot to be configured in the admin console.
- [#45] - Fix invalid roomconfig value: moderators (should be: moderator)
diff --git a/classes/ofmeet.js b/classes/ofmeet.js
index dfc1b6474..6bf0b0fde 100644
--- a/classes/ofmeet.js
+++ b/classes/ofmeet.js
@@ -139,6 +139,21 @@ var ofmeet = (function(of)
console.error('join workgroup error', err);
document.getElementById("chatloader").style.visibility = "hidden";
});
+
+ _converse.connection.addHandler(function(message) {
+ if (message.querySelector('depart-queue')) {
+ console.info("joining workgroup failed - departed the queue")
+ document.getElementById("chatloader").style.visibility = "hidden";
+ document.getElementById("chatbutton").style.visibility = "visible";
+ // TODO: give some kind of feedback to the end-user, explaining why this has happened.
+
+ // Got a 'depart-queue' message: remove this handler by returning 'false'.
+ return false; // TODO this handler should also be removed after successfully joining a room.
+ } else {
+ // Did not get a 'depart-queue' message: retain this handler by returning 'true'.
+ return true
+ }
+ }, 'http://jabber.org/protocol/workgroup','message');
}
function getFastPathStatus(callback)