From b85b1aa0802ab6058796cd2dc299aac35f49a25e Mon Sep 17 00:00:00 2001 From: mcneb10 Date: Sat, 1 Jun 2024 18:18:11 -0500 Subject: [PATCH] fix more stuff --- main.lua | 6 ++++-- utils.lua | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/main.lua b/main.lua index ac6d5a9..38de5fe 100755 --- a/main.lua +++ b/main.lua @@ -32,9 +32,10 @@ client:hook("ready", function() if room then -- Run on message events - log("info", "Joined room \"%s\"", room.jid) room:hook("message", function(event) - if event.stanza.attr.type == "groupchat" and not string.find(event.stanza.attr.from, "/" .. config.name) then + if event.stanza.attr.type == "groupchat" + and not string.find(event.stanza.attr.from, "/" .. config.name) + and not event.stanza:get_child("delay", "urn:xmpp:delay") then local body = event.stanza:get_child_text("body") if body then for site, services in pairs(config.sites) do @@ -49,6 +50,7 @@ client:hook("ready", function() end end end) + log("info", "Joined room \"%s\"", room.jid) else log("error", "Error joining room \"%s\": %s", room.jid, err) end diff --git a/utils.lua b/utils.lua index bdf1772..fd83a38 100644 --- a/utils.lua +++ b/utils.lua @@ -46,7 +46,7 @@ function send_reply_link(room, match, site, instance, event) if config.use_reply_xep then room:send(verse.message() -- Set message text - :body(msg) + :body(msg):up() -- Set reply block :tag("reply", { xmlns = 'urn:xmpp:reply:0',