comparison mod_invites_page/mod_invites_page.lua @ 6201:d68e640e76ad

mod_invites_page: Skip adding landing page for password reset invites Such invites are not currently supported and rendering them as regular invites is confusing and does not work correctly
author Kim Alvefur <zash@zash.se>
date Thu, 17 Apr 2025 16:51:02 +0200
parents dfdf0bf1e84f
children
comparison
equal deleted inserted replaced
6200:1c16bb49f6f6 6201:d68e640e76ad
58 if not invite_url_template then return; end 58 if not invite_url_template then return; end
59 -- TODO: we don't currently have a landing page for subscription-only invites, 59 -- TODO: we don't currently have a landing page for subscription-only invites,
60 -- so the user will only receive a URI. The client should be able to handle this 60 -- so the user will only receive a URI. The client should be able to handle this
61 -- by automatically falling back to a client-specific landing page, per XEP-0401. 61 -- by automatically falling back to a client-specific landing page, per XEP-0401.
62 if not invite.allow_registration then return; end 62 if not invite.allow_registration then return; end
63 -- password reset invites are not currently supported
64 if invite.additional_data and invite.additional_data.allow_reset then return end
63 invite.landing_page = render_url(invite_url_template, { host = module.host, invite = invite }); 65 invite.landing_page = render_url(invite_url_template, { host = module.host, invite = invite });
64 end 66 end
65 67
66 module:hook("invite-created", add_landing_url); 68 module:hook("invite-created", add_landing_url);
67 69