Mercurial > prosody-modules
comparison mod_report_forward/mod_report_forward.lua @ 6039:93efc6c4fe93
mod_report_forward: Drop 'spam' prefix from address field, it's not only spam
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 26 Nov 2024 12:14:24 +0000 |
| parents | 91590d92b919 |
| children | 226886ffafb0 |
comparison
equal
deleted
inserted
replaced
| 6038:91590d92b919 | 6039:93efc6c4fe93 |
|---|---|
| 68 local response = result.stanza; | 68 local response = result.stanza; |
| 69 if response.attr.type == "result" then | 69 if response.attr.type == "result" then |
| 70 for form in response.tags[1]:childtags("x", "jabber:x:data") do | 70 for form in response.tags[1]:childtags("x", "jabber:x:data") do |
| 71 local form_type = form:get_child_with_attr("field", nil, "var", "FORM_TYPE"); | 71 local form_type = form:get_child_with_attr("field", nil, "var", "FORM_TYPE"); |
| 72 if form_type and form_type:get_child_text("value") == "http://jabber.org/network/serverinfo" then | 72 if form_type and form_type:get_child_text("value") == "http://jabber.org/network/serverinfo" then |
| 73 address = get_address(form, "spam-report-addresses", "abuse-addresses"); | 73 address = get_address(form, "report-addresses", "abuse-addresses"); |
| 74 break; | 74 break; |
| 75 end | 75 end |
| 76 end | 76 end |
| 77 end | 77 end |
| 78 | 78 |
