Do not remove onInvalidate event subscription from app
diff --git a/app.js b/app.js
index 5b5b61b..e07fc38 100644
--- a/app.js
+++ b/app.js
@@ -296,7 +296,6 @@
conversations.init = function() {
var app = this;
- this._removeUserInvalidationFrom(this);
this._retrieveData(function() {
app.render();
app.ready();
@@ -1259,23 +1258,6 @@
});
};
-// removing "Echo.UserSession.onInvalidate" subscription from an app
-// to avoid double-handling of the same evernt (by Canvas and by the widget itself)
-conversations.methods._removeUserInvalidationFrom = function() {
- var topic = "Echo.UserSession.onInvalidate";
- $.map(Array.prototype.slice.call(arguments), function(inst) {
- $.each(inst.subscriptionIDs, function(id) {
- var obj = $.grep(Echo.Events._subscriptions[topic].global.handlers, function(o) {
- return o.id === id;
- })[0];
- if (obj && obj.id) {
- Echo.Events.unsubscribe({"handlerId": obj.id});
- return false;
- }
- });
- });
-};
-
conversations.methods._triggerInitialCounterUpdateEvents = function(data) {
var app = this;
$.map(["topPosts", "allPosts", "moderationQueue"], function(component) {