Software /
code /
prosody
Changeset
13851:ecafafec7806 13.0
mod_invites: Consider password reset a distinct type wrt invite page
This should prevent returning an invite web page unless it supports
password resets.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 15 Apr 2025 21:47:13 +0200 |
parents | 13849:068e77bf91b9 |
children | 13852:ce4b4c2863f3 |
files | plugins/mod_invites.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_invites.lua Wed Apr 16 12:02:31 2025 +0100 +++ b/plugins/mod_invites.lua Tue Apr 15 21:47:13 2025 +0200 @@ -221,7 +221,11 @@ -- Determine whether this type of invitation is supported by the landing page local invite_type; if invite.type == "register" then - invite_type = "account"; + if invite.additional_data and invite.additional_data.allow_reset then + invite_type = "password-reset"; + else + invite_type = "account"; + end elseif invite.type == "roster" then if invite.allow_registration then invite_type = "account-and-contact";