mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-13 21:46:56 -08:00
Support Registration on Webatrice with a baseline of handling. (#4436)
* Support Registration on Webatrice with a baseline of handling. Still needs to support activation tokens & unit testing. * Add support for account activation with token * Activate Account refactor * Fix typo * Add Unit Testing for Commands/Events * Changes based on review feedback
This commit is contained in:
@@ -43,4 +43,21 @@ export default class NormalizeService {
|
||||
message.message = `${name}: ${message.message}`;
|
||||
}
|
||||
}
|
||||
|
||||
// Banned reason string is not being exposed by the server
|
||||
static normalizeBannedUserError(reasonStr: string, endTime: number): string {
|
||||
let error;
|
||||
|
||||
if (endTime) {
|
||||
error = 'You are banned until ' + new Date(endTime).toString();
|
||||
} else {
|
||||
error = 'You are permanently banned';
|
||||
}
|
||||
|
||||
if (reasonStr) {
|
||||
error += '\n\n' + reasonStr;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user