# HG changeset patch # User Menel # Date 1773402185 -3600 # Node ID 021eff79a1f56ec55d2ed12cc337515ccbb2234e # Parent 2cf397983c16d7cecc594482726bcb50a27265c5 mod_watchuntrusted/mod_watchuntrusted.lua: making luacheck happy diff -r 2cf397983c16 -r 021eff79a1f5 mod_watchuntrusted/mod_watchuntrusted.lua --- 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;