diff options
| author | olive <olive@olive.ooo> | 2026-09-17 20:29:09 +0100 |
|---|---|---|
| committer | olive <olive@olive.ooo> | 2026-09-17 20:29:09 +0100 |
| commit | 9157750d04dfb2863bc5822b908336e663b141b1 (patch) | |
| tree | 3ec8ac81aef2ea1e67db38d6c2b013ee8dddab33 /main.lua | |
| parent | 87ed4adab569504e4ce053f8288a84404f63c8dc (diff) | |
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.
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |
