fix more stuff

This commit is contained in:
mcneb10 2024-06-01 18:18:11 -05:00
parent 3bc78e3991
commit b85b1aa080
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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',