Software / code / prosody
Comparison
plugins/mod_invites_register.lua @ 13850:0326e1338d73
Merge 13.0->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Wed, 16 Apr 2025 12:03:08 +0100 |
| parent | 13849:068e77bf91b9 |
comparison
equal
deleted
inserted
replaced
| 13848:45c508a12865 | 13850:0326e1338d73 |
|---|---|
| 101 -- for this module to do... | 101 -- for this module to do... |
| 102 return; | 102 return; |
| 103 end | 103 end |
| 104 if validated_invite then | 104 if validated_invite then |
| 105 local username = validated_invite.username; | 105 local username = validated_invite.username; |
| 106 if username and username ~= event.username then | 106 if validated_invite.type ~= "roster" and username and username ~= event.username then |
| 107 event.allowed = false; | 107 event.allowed = false; |
| 108 event.reason = "The chosen username is not valid with this invitation"; | 108 event.reason = "The chosen username is not valid with this invitation"; |
| 109 end | 109 end |
| 110 local reset_username = validated_invite.additional_data and validated_invite.additional_data.allow_reset; | 110 local reset_username = validated_invite.additional_data and validated_invite.additional_data.allow_reset; |
| 111 if reset_username then | 111 if reset_username then |