# HG changeset patch # User Matthew Wild # Date 1637341238 0 # Node ID 4abb33a15897d2bcff5f3eb3d8210239903917ad # Parent 6395d4732bc603a60fa5c19ffd2a9d2328fad0fb mod_muc_offline_delivery: Fix logic bug causing traceback when no reserved_nick (thanks Hund) diff -r 6395d4732bc6 -r 4abb33a15897 mod_muc_offline_delivery/mod_muc_offline_delivery.lua --- a/mod_muc_offline_delivery/mod_muc_offline_delivery.lua Fri Nov 19 13:45:21 2021 +0100 +++ b/mod_muc_offline_delivery/mod_muc_offline_delivery.lua Fri Nov 19 17:00:38 2021 +0000 @@ -22,7 +22,7 @@ for jid, affiliation, data in room:each_affiliation() do --luacheck: ignore 213/affiliation local reserved_nickname = data and data.reserved_nickname; local user_setting = data and data.offline_delivery or nil; - if reserved_nickname and user_setting or (user_setting == nil and default_enable) then + if reserved_nickname and (user_setting or (user_setting == nil and default_enable)) then local is_absent = not room:get_occupant_by_nick(room.jid.."/"..reserved_nickname); if is_absent then module:log("debug", "Forwarding message to offline member <%s>", jid);