Mercurial > prosody-modules
changeset 6462:021eff79a1f5
mod_watchuntrusted/mod_watchuntrusted.lua: making luacheck happy
| author | Menel <menel@snikket.de> |
|---|---|
| date | Fri, 13 Mar 2026 12:43:05 +0100 |
| parents | 2cf397983c16 |
| children | 996c038dfca3 |
| files | mod_watchuntrusted/mod_watchuntrusted.lua |
| diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_watchuntrusted/mod_watchuntrusted.lua Fri Mar 13 12:28:20 2026 +0100 +++ b/mod_watchuntrusted/mod_watchuntrusted.lua Fri Mar 13 12:43:05 2026 +0100 @@ -7,7 +7,10 @@ local ignore_domains = module:get_option_set("untrusted_ignore_domains", {})._items; local untrusted_fail_watchers = module:get_option_set("untrusted_fail_watchers", module:get_option("admins", {})) / jid_prep; -local untrusted_fail_notification = module:get_option("untrusted_fail_notification", "Establishing a secure connection from $from_host to $to_host failed. Certificate hash: $sha256. $errors"); +local untrusted_fail_notification = module:get_option( + "untrusted_fail_notification", + "Establishing a secure connection from $from_host to $to_host failed. Certificate hash: $sha256. $errors" +); local msg_type = module:get_option_string("untrusted_message_type", "chat"); @@ -21,7 +24,7 @@ local conn = session.conn:socket(); local local_host = session.direction == "outgoing" and session.from_host or session.to_host; - if not (local_host == module:get_host()) then return end + if (local_host ~= module:get_host()) then return end module:log("debug", "Checking certificate..."); local certificate_is_valid = false;
