# HG changeset patch # User Emmanuel Gil Peyrot # Date 1631825272 -7200 # Node ID 37232302dfb9398a7b2f1df190d62b3c95450fa9 # Parent 1f1dbf652b3731f174cd9201df88758b54ad5cc3 mod_muc_require_tos: Prevent a traceback when receiving a message with occupant being nil diff -r 1f1dbf652b37 -r 37232302dfb9 mod_muc_require_tos/mod_muc_require_tos.lua --- a/mod_muc_require_tos/mod_muc_require_tos.lua Thu Sep 16 22:32:59 2021 +0200 +++ b/mod_muc_require_tos/mod_muc_require_tos.lua Thu Sep 16 22:47:52 2021 +0200 @@ -28,7 +28,7 @@ module:hook("muc-occupant-groupchat", function(event) local occupant = event.occupant; - if occupant.role ~= "visitor" then + if occupant == nil or occupant.role ~= "visitor" then return; end local origin = event.origin;