Changeset

13849:068e77bf91b9 13.0

mod_invites_register: Don't restrict username for roster invites (thanks lissine) The username field of roster invites is the username of the inviter. It is not possible for a roster invite to restrict the registration username.
author Matthew Wild <mwild1@gmail.com>
date Wed, 16 Apr 2025 12:02:31 +0100
parents 13847:cbd234461c41
children 13850:0326e1338d73 13851:ecafafec7806
files plugins/mod_invites_register.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_invites_register.lua	Mon Apr 14 15:10:29 2025 +0200
+++ b/plugins/mod_invites_register.lua	Wed Apr 16 12:02:31 2025 +0100
@@ -103,7 +103,7 @@
 	end
 	if validated_invite then
 		local username = validated_invite.username;
-		if username and username ~= event.username then
+		if validated_invite.type ~= "roster" and username and username ~= event.username then
 			event.allowed = false;
 			event.reason = "The chosen username is not valid with this invitation";
 		end