summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
authorolive <olive@olive.ooo>2026-09-17 20:29:09 +0100
committerolive <olive@olive.ooo>2026-09-17 20:29:09 +0100
commit9157750d04dfb2863bc5822b908336e663b141b1 (patch)
tree3ec8ac81aef2ea1e67db38d6c2b013ee8dddab33 /main.lua
parent87ed4adab569504e4ce053f8288a84404f63c8dc (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.lua8
1 files changed, 4 insertions, 4 deletions
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