# HG changeset patch # User Stephen Paul Weber # Date 1710203299 18000 # Node ID fdff8cb54302dd13b3fbe31c2cc11905cf03f97f # Parent 259ffdbf89064f871b805b46fc74e6b7a8ec4121 mod_report_forward: fix address detection when there are multiple field values diff -r 259ffdbf8906 -r fdff8cb54302 mod_report_forward/mod_report_forward.lua --- a/mod_report_forward/mod_report_forward.lua Tue Mar 05 18:26:29 2024 +0000 +++ b/mod_report_forward/mod_report_forward.lua Mon Mar 11 19:28:19 2024 -0500 @@ -41,9 +41,11 @@ local field_var = select(i, ...); local field = form:get_child_with_attr("field", nil, "var", field_var); if field then - local parsed = url.parse(field:get_child_text("value")); - if parsed.scheme == "xmpp" and parsed.path and not parsed.query then - return parsed.path; + for value in field:childtags("value") do + local parsed = url.parse(value:get_text()); + if parsed.scheme == "xmpp" and parsed.path and not parsed.query then + return parsed.path; + end end else module:log("debug", "No field '%s'", field_var);