Invites: unique email/ID requirement
"Require unique ..." Settings (`require_unique` in relevant sections of config.ini) are now available for email/discord/telegram/matrix. An error is shown on the invite form if a non-unique address/ID is used. This was on my kanban without a link to an issue, so i'm guessing it was requested on Discord.
This commit is contained in:
+10
@@ -61,6 +61,9 @@ if (window.telegramEnabled) {
|
||||
window.telegramModal.close();
|
||||
window.notifications.customError("invalidCodeError", window.messages["errorInvalidCode"]);
|
||||
return;
|
||||
} else if (req.status == 400) {
|
||||
window.telegramModal.close();
|
||||
window.notifications.customError("accountLinkedError", window.messages["errorAccountLinked"]);
|
||||
} else if (req.status == 200) {
|
||||
if (req.response["success"] as boolean) {
|
||||
telegramVerified = true;
|
||||
@@ -124,6 +127,9 @@ if (window.discordEnabled) {
|
||||
window.discordModal.close();
|
||||
window.notifications.customError("invalidCodeError", window.messages["errorInvalidCode"]);
|
||||
return;
|
||||
} else if (req.status == 400) {
|
||||
window.discordModal.close();
|
||||
window.notifications.customError("accountLinkedError", window.messages["errorAccountLinked"]);
|
||||
} else if (req.status == 200) {
|
||||
if (req.response["success"] as boolean) {
|
||||
discordVerified = true;
|
||||
@@ -165,6 +171,10 @@ if (window.matrixEnabled) {
|
||||
};
|
||||
_post("/invite/" + window.code + "/matrix/user", send, (req: XMLHttpRequest) => {
|
||||
if (req.readyState == 4) {
|
||||
if (req.status == 400 && req.response["error"] == "errorAccountLinked") {
|
||||
window.matrixModal.close();
|
||||
window.notifications.customError("accountLinkedError", window.messages["errorAccountLinked"]);
|
||||
}
|
||||
removeLoader(submitButton);
|
||||
userID = input.value;
|
||||
if (req.status != 200) {
|
||||
|
||||
Reference in New Issue
Block a user