From 71cee0014368f5d83fe94989526a4ffb2824f50c Mon Sep 17 00:00:00 2001 From: rebecca Date: Thu, 24 Sep 2026 17:20:42 +0100 Subject: change fields on Message to include author --- quaddle/pylon.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'quaddle/pylon.lua') diff --git a/quaddle/pylon.lua b/quaddle/pylon.lua index 2d283ea..4387342 100644 --- a/quaddle/pylon.lua +++ b/quaddle/pylon.lua @@ -80,22 +80,22 @@ function Quaddle.recving(self) end function Quaddle.handle_message(self, msg) - self.log:proto('<',msg.channel_id,msg.author.username,msg.content) + self.log:proto('<',msg.channel_id,msg.author.name,msg.content) if msg.author.id ~= self.bot_user.id then - self.wilson:deliver({ - source_channel = Thing(self, msg.channel), + self.wilson:deliver(Message { + pylon = self, + channel = Thing(self, msg.channel), + author = Thing(self,msg.author.id,msg.author.username), body = msg.content, - sender = msg.author.name, }) end end function Quaddle.sending(self) for dest_channel, message in self.inbox:iter() do - self.log:proto('>', dest_channel, message.sender, message.body) - + self.log:proto('>', dest_channel, message.author, message.body) self:_req('channels/'..dest_channel.id..'/messages', { - content = "["..message.source_channel.pylon.shortname.."] "..message.sender..": "..message.body, + content = message.author:name_with_shortname()..": "..message.body, }) end end -- cgit v1.2.3