equal
deleted
inserted
replaced
261 |
261 |
262 function action_handlers.REPORT_TO(spec) |
262 function action_handlers.REPORT_TO(spec) |
263 local where, reason, text = spec:match("^%s*(%S+) *(%S*) *(.*)$"); |
263 local where, reason, text = spec:match("^%s*(%S+) *(%S*) *(.*)$"); |
264 if reason == "spam" then |
264 if reason == "spam" then |
265 reason = "urn:xmpp:reporting:spam"; |
265 reason = "urn:xmpp:reporting:spam"; |
266 elseif reason == "abuse" or not reason then |
266 elseif reason == "abuse" or not reason or reason = "" then |
267 reason = "urn:xmpp:reporting:abuse"; |
267 reason = "urn:xmpp:reporting:abuse"; |
268 end |
268 end |
269 local code = [[ |
269 local code = [[ |
270 local newstanza = st.stanza("message", { to = %q, from = current_host }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" }); |
270 local newstanza = st.stanza("message", { to = %q, from = current_host }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" }); |
271 local tmp_stanza = st.clone(stanza); tmp_stanza.attr.xmlns = "jabber:client"; newstanza:add_child(tmp_stanza):up(); |
271 local tmp_stanza = st.clone(stanza); tmp_stanza.attr.xmlns = "jabber:client"; newstanza:add_child(tmp_stanza):up(); |