Software /
code /
prosody-modules
Changeset
4121:ee8e7f5196b4
mod_invites_register: Fix traceback for non-invite registrations
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 14 Sep 2020 15:05:19 +0100 |
parents | 4120:d3c7be9e36d9 |
children | 4122:9cdbf2b84342 |
files | mod_invites_register/mod_invites_register.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_invites_register/mod_invites_register.lua Mon Sep 14 15:55:29 2020 +0200 +++ b/mod_invites_register/mod_invites_register.lua Mon Sep 14 15:05:19 2020 +0100 @@ -89,6 +89,11 @@ event.allowed = false; event.reason = "Registration on this server is through invitation only"; return; + elseif not validated_invite then + -- This registration is not using an invite, but + -- the server is not in invite-only mode, so nothing + -- for this module to do... + return; end if validated_invite and validated_invite.additional_data and validated_invite.additional_data.allow_reset then event.allow_reset = validated_invite.additional_data.allow_reset;