Add userset length

This commit is contained in:
Hri7566 2024-07-09 02:45:25 -04:00
parent f52715abf3
commit a126ba0fee
1 changed files with 3 additions and 0 deletions

View File

@ -356,6 +356,9 @@ export class Socket extends EventEmitter {
typeof color === "string" && !!color.match(/^#[0-9a-f]{6}$/i);
}
if (typeof name !== "string") return;
if (name.length > 40) return;
await updateUser(this._id, {
name: typeof name == "string" ? name : undefined,
color: color && isColor ? color : undefined