mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-07-29 16:18:36 -04:00
Modified matrixService.register to specify if captcha results should be sent with the registration request. This is toggleable via useCaptcha in register-controller.
This commit is contained in:
parent
0280176ccd
commit
130458385e
2 changed files with 28 additions and 6 deletions
|
@ -19,6 +19,8 @@ angular.module('RegisterController', ['matrixService'])
|
|||
function($scope, $rootScope, $location, matrixService, eventStreamService) {
|
||||
'use strict';
|
||||
|
||||
var useCaptcha = false;
|
||||
|
||||
// FIXME: factor out duplication with login-controller.js
|
||||
|
||||
// Assume that this is hosted on the home server, in which case the URL
|
||||
|
@ -87,7 +89,7 @@ angular.module('RegisterController', ['matrixService'])
|
|||
};
|
||||
|
||||
$scope.registerWithMxidAndPassword = function(mxid, password, threepidCreds) {
|
||||
matrixService.register(mxid, password, threepidCreds).then(
|
||||
matrixService.register(mxid, password, threepidCreds, useCaptcha).then(
|
||||
function(response) {
|
||||
$scope.feedback = "Success";
|
||||
// Update the current config
|
||||
|
@ -154,7 +156,9 @@ angular.module('RegisterController', ['matrixService'])
|
|||
};
|
||||
|
||||
$scope.init = function() {
|
||||
setupCaptcha();
|
||||
if (useCaptcha) {
|
||||
setupCaptcha();
|
||||
}
|
||||
};
|
||||
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue