From b89376a00e6d6a18799461f5dc7fce5c142a39ec Mon Sep 17 00:00:00 2001 From: Andrey Sidorov Date: Wed, 8 Oct 2014 20:41:45 +1100 Subject: [PATCH] route event to parent if parent id exist --- lib/xcore.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/xcore.js b/lib/xcore.js index 0ed9532..557270f 100644 --- a/lib/xcore.js +++ b/lib/xcore.js @@ -482,6 +482,11 @@ XClient.prototype.expectReplyHeader = function() if (ee) { ee.emit('event', ev); } + if (ev.parent) { + ee = client.event_consumers[ev.parent]; + if (ee) + ee.emit('child-event', ev); + } client.expectReplyHeader(); } ); return;