Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
generateRegistration: function(appServiceUrl, callback) {
var reg = new AppServiceRegistration(appServiceUrl);
reg.setHomeserverToken(AppServiceRegistration.generateToken());
reg.setAppServiceToken(AppServiceRegistration.generateToken());
reg.setSenderLocalpart("vertobot");
reg.addRegexPattern("users", "@" + USER_PREFIX + ".*", true);
console.log(
"Generating registration to '%s' for the AS accessible from: %s",
REGISTRATION_FILE, appServiceUrl
);
callback(reg);
},
run: runBridge
generateRegistration: function(callback) {
var reg = new AppServiceRegistration("http://localhost:8008");
reg.setHomeserverToken(AppServiceRegistration.generateToken());
reg.setAppServiceToken(AppServiceRegistration.generateToken());
reg.setSenderLocalpart("bridge-example");
reg.addRegexPattern("users", "@example_.*", true);
console.log("Generating registration to 'my-bridge-registration.yaml'");
callback(reg);
}
});
generateRegistration: function(callback) {
var reg = new AppServiceRegistration("http://localhost:8008");
reg.setHomeserverToken(AppServiceRegistration.generateToken());
reg.setAppServiceToken(AppServiceRegistration.generateToken());
reg.setSenderLocalpart("bridge-example");
reg.addRegexPattern("users", "@example_.*", true);
console.log("Generating registration to 'my-bridge-registration.yaml'");
callback(reg);
}
});
generateRegistration: function(appServiceUrl, callback) {
var reg = new AppServiceRegistration(appServiceUrl);
reg.setHomeserverToken(AppServiceRegistration.generateToken());
reg.setAppServiceToken(AppServiceRegistration.generateToken());
reg.setSenderLocalpart("vertobot");
reg.addRegexPattern("users", "@" + USER_PREFIX + ".*", true);
console.log(
"Generating registration to '%s' for the AS accessible from: %s",
REGISTRATION_FILE, appServiceUrl
);
callback(reg);
},
run: runBridge