3bc05d88df
* if both local and remote instance have external XMPP connections enabled, the user joins the remote room with his local account * some code refactoring (builtin.ts) Note: documentation and settings descriptions are to do. Related to #112
10 lines
244 B
TypeScript
10 lines
244 B
TypeScript
function randomNick (base: string): string {
|
|
// using a 6 digit random number to generate a nickname with low colision risk
|
|
const n = 100000 + Math.floor(Math.random() * 900000)
|
|
return base + ' ' + n.toString()
|
|
}
|
|
|
|
export {
|
|
randomNick
|
|
}
|