From 9157750d04dfb2863bc5822b908336e663b141b1 Mon Sep 17 00:00:00 2001 From: olive Date: Thu, 17 Sep 2026 20:29:09 +0100 Subject: Use shortname config rather than hard-coding [x] and so on. Pylons may also make their own choce in how they format the short-name when sending out (or do it differently altogether), rather than it being baked-in by the receiving pylon. --- main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index e928fdb..2d46f70 100644 --- a/main.lua +++ b/main.lua @@ -51,12 +51,12 @@ function Wilson._find_bus(self, channel) end self.log:warn("unfound bus for",channel) end -function Wilson.deliver(self, source_channel, message) - local bus = self:_find_bus(source_channel) +function Wilson.deliver(self, message) + local bus = self:_find_bus(assert(message.source_channel)) if bus then for _, dest_channel in ipairs(bus) do - if source_channel ~= dest_channel then - self.log:debug(source_channel, "-->", dest_channel, message) + if message.source_channel ~= dest_channel then + self.log:debug(message.source_channel, "-->", dest_channel, message) dest_channel.pylon:post(dest_channel, message) end end -- cgit v1.2.3