summaryrefslogtreecommitdiff
path: root/quaddle/pylon.lua
diff options
context:
space:
mode:
authorrebecca <ubq323@ubq323.website>2026-09-25 16:41:52 +0100
committerrebecca <ubq323@ubq323.website>2026-09-25 16:49:36 +0100
commit28a876fa341174e8d17640fc215854328ce65b42 (patch)
tree64be5771e6dd48e0d45a3cdc65bcda1f62369277 /quaddle/pylon.lua
parent89c71b2939ce610b4251d0d9f22b9e0d2217a106 (diff)
consistentize 'channels' maps in pylons
for live reloading to work, wilson needs to know which channels each pylon currently cares about, so it knows which combination of add_channel and remove_channel to call on each one discord: rename channel_to_webhook --> channels xmpp: rename mucs --> channels quaddle: add channels map
Diffstat (limited to 'quaddle/pylon.lua')
-rw-r--r--quaddle/pylon.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/quaddle/pylon.lua b/quaddle/pylon.lua
index 86e465a..20eeb3a 100644
--- a/quaddle/pylon.lua
+++ b/quaddle/pylon.lua
@@ -10,6 +10,7 @@ local Thing = require 'thing'
local Quaddle = class.extend(BasePylon)
function Quaddle.init(self)
self:_check_fields "base_url bot_name bot_password"
+ self.channels = {}
end
-- https://codeberg.org/QWD/Quaddle/src/branch/main/doc/api.md
@@ -46,6 +47,7 @@ end
function Quaddle.add_channel(self, channel)
self.log("Subscribing to channel",channel.id)
self.ws:send(json.encode{ op="subscribe", channel_id=channel.id })
+ self.channels[channel.id] = true
end
function Quaddle.recving(self)