diff --git a/lib/service/handlers.js b/lib/service/handlers.js index bdc3a2f..4719210 100644 --- a/lib/service/handlers.js +++ b/lib/service/handlers.js @@ -273,11 +273,11 @@ function handleMessage (msg, bus) { signature } = msg; - const ifaceName = msg.interface; + let ifaceName = msg.interface; signature = signature || ''; - if (handleStdIfaces(bus, msg)) { + if (ifaceName && handleStdIfaces(bus, msg)) { return true; } @@ -286,6 +286,9 @@ function handleMessage (msg, bus) { } const obj = bus._getServiceObject(path); + if (!ifaceName && Object.keys(obj.interfaces).length > 0){ + ifaceName = Object.keys(obj.interfaces)[0]; + } const iface = obj.interfaces[ifaceName]; if (!iface) {