diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-12 03:24:51 +0200 |
---|---|---|
committer | TheArcaneBrony <myrainbowdash949@gmail.com> | 2022-08-13 21:57:51 +0200 |
commit | 1d52b0d0721094d7f8dfaabddedd9f08a5e456a5 (patch) | |
tree | 1136d2550f7f47f4eebd560251353f9c0cd98a6f /util/src/entities | |
parent | Push local state... (diff) | |
download | server-1d52b0d0721094d7f8dfaabddedd9f08a5e456a5.tar.xz |
Fix updated client stuff...
Diffstat (limited to 'util/src/entities')
-rw-r--r-- | util/src/entities/BaseClass.ts | 2 | ||||
-rw-r--r-- | util/src/entities/Channel.ts | 7 | ||||
-rw-r--r-- | util/src/entities/User.ts | 6 |
3 files changed, 12 insertions, 3 deletions
diff --git a/util/src/entities/BaseClass.ts b/util/src/entities/BaseClass.ts index c872e7f1..aecc2465 100644 --- a/util/src/entities/BaseClass.ts +++ b/util/src/entities/BaseClass.ts @@ -1,5 +1,5 @@ import "reflect-metadata"; -import { BaseEntity, EntityMetadata, ObjectIdColumn, PrimaryColumn, FindOptionsWhere, Generated, SaveOptions } from "typeorm"; +import { BaseEntity, ObjectIdColumn, PrimaryColumn, SaveOptions } from "typeorm"; import { Snowflake } from "../util/Snowflake"; export class BaseClassWithoutId extends BaseEntity { diff --git a/util/src/entities/Channel.ts b/util/src/entities/Channel.ts index ade0fb39..a576d7af 100644 --- a/util/src/entities/Channel.ts +++ b/util/src/entities/Channel.ts @@ -151,6 +151,13 @@ export class Channel extends BaseClass { }) webhooks?: Webhook[]; + @Column({ nullable: true }) + flags?: number = 0; + + @Column({ nullable: true }) + default_thread_rate_limit_per_user?: number = 0; + + // TODO: DM channel static async createChannel( channel: Partial<Channel>, diff --git a/util/src/entities/User.ts b/util/src/entities/User.ts index 6edcda97..61343e81 100644 --- a/util/src/entities/User.ts +++ b/util/src/entities/User.ts @@ -185,8 +185,10 @@ export class User extends BaseClass { notes: { [key: string]: string } = {}; //key is ID of user async save(): Promise<any> { - await this.settings.save(); - return this.save(); + if(!this.settings) this.settings = new UserSettings(); + this.settings.id = this.id; + //await this.settings.save(); + return super.save(); } toPublicUser() { |