Mercurial > prosody-modules
comparison mod_invites_register/mod_invites_register.lua @ 4120:d3c7be9e36d9
mod_invites_register: Fix traceback on registration via other module (thanks franck)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 14 Sep 2020 15:55:29 +0200 |
parents | d34572047488 |
children | ee8e7f5196b4 |
comparison
equal
deleted
inserted
replaced
4119:559ca8d93302 | 4120:d3c7be9e36d9 |
---|---|
88 if invite_only and not validated_invite then | 88 if invite_only and not validated_invite then |
89 event.allowed = false; | 89 event.allowed = false; |
90 event.reason = "Registration on this server is through invitation only"; | 90 event.reason = "Registration on this server is through invitation only"; |
91 return; | 91 return; |
92 end | 92 end |
93 if validated_invite.additional_data and validated_invite.additional_data.allow_reset then | 93 if validated_invite and validated_invite.additional_data and validated_invite.additional_data.allow_reset then |
94 event.allow_reset = validated_invite.additional_data.allow_reset; | 94 event.allow_reset = validated_invite.additional_data.allow_reset; |
95 end | 95 end |
96 end); | 96 end); |
97 | 97 |
98 -- Make a *one-way* subscription. User will see when contact is online, | 98 -- Make a *one-way* subscription. User will see when contact is online, |