fix more stuff
This commit is contained in:
parent
3bc78e3991
commit
b85b1aa080
2 changed files with 5 additions and 3 deletions
6
main.lua
6
main.lua
|
@ -32,9 +32,10 @@ client:hook("ready", function()
|
||||||
|
|
||||||
if room then
|
if room then
|
||||||
-- Run on message events
|
-- Run on message events
|
||||||
log("info", "Joined room \"%s\"", room.jid)
|
|
||||||
room:hook("message", function(event)
|
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")
|
local body = event.stanza:get_child_text("body")
|
||||||
if body then
|
if body then
|
||||||
for site, services in pairs(config.sites) do
|
for site, services in pairs(config.sites) do
|
||||||
|
@ -49,6 +50,7 @@ client:hook("ready", function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
log("info", "Joined room \"%s\"", room.jid)
|
||||||
else
|
else
|
||||||
log("error", "Error joining room \"%s\": %s", room.jid, err)
|
log("error", "Error joining room \"%s\": %s", room.jid, err)
|
||||||
end
|
end
|
||||||
|
|
|
@ -46,7 +46,7 @@ function send_reply_link(room, match, site, instance, event)
|
||||||
if config.use_reply_xep then
|
if config.use_reply_xep then
|
||||||
room:send(verse.message()
|
room:send(verse.message()
|
||||||
-- Set message text
|
-- Set message text
|
||||||
:body(msg)
|
:body(msg):up()
|
||||||
-- Set reply block
|
-- Set reply block
|
||||||
:tag("reply", {
|
:tag("reply", {
|
||||||
xmlns = 'urn:xmpp:reply:0',
|
xmlns = 'urn:xmpp:reply:0',
|
||||||
|
|
Loading…
Reference in a new issue