summary refs log tree commit diff
path: root/src/models/User.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/User.ts')
-rw-r--r--src/models/User.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/models/User.ts b/src/models/User.ts

index 1f01e837..8511a9b0 100644 --- a/src/models/User.ts +++ b/src/models/User.ts
@@ -2,6 +2,7 @@ import { Activity } from "./Activity"; import { ClientStatus, Status } from "./Status"; import { Schema, Types, Document } from "mongoose"; import db from "../util/Database"; +import toBigInt from "../util/toBigInt"; export const PublicUserProjection = { username: true, @@ -141,8 +142,8 @@ export const UserSchema = new Schema({ created_at: Date, verified: Boolean, email: String, - flags: Types.Long, // TODO: automatically convert Types.Long to BitField of UserFlags - public_flags: Types.Long, + flags: { type: String, get: toBigInt }, // TODO: automatically convert Types.Long to BitField of UserFlags + public_flags: { type: String, get: toBigInt }, guilds: [String], // array of guild ids the user is part of user_data: { fingerprints: [String],