summary refs log tree commit diff
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-04-02 10:22:54 +0300
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-04-02 10:22:54 +0300
commit31bfe2a22a81b0878e9232d91b19925ff12d4007 (patch)
treeabac0ee531ef9e063e53a2771b10af6f57872b9f
parentFix typo in table 'client_relase' -> 'client_release' ( and other of the same... (diff)
downloadserver-31bfe2a22a81b0878e9232d91b19925ff12d4007.tar.xz
first steps for E2EE support — channel security settings event
-rw-r--r--util/src/entities/Encryption.ts35
1 files changed, 35 insertions, 0 deletions
diff --git a/util/src/entities/Encryption.ts b/util/src/entities/Encryption.ts
new file mode 100644
index 00000000..3b82ff84
--- /dev/null
+++ b/util/src/entities/Encryption.ts
@@ -0,0 +1,35 @@
+import { Column, Entity, JoinColumn, ManyToOne, OneToMany, RelationId } from "typeorm";
+import { BaseClass } from "./BaseClass";
+import { Guild } from "./Guild";
+import { PublicUserProjection, User } from "./User";
+import { HTTPError } from "lambert-server";
+import { containsAll, emitEvent, getPermission, Snowflake, trimSpecial, InvisibleCharacters } from "../util";
+import { BitField, BitFieldResolvable, BitFlag } from "../util/BitField";
+import { Recipient } from "./Recipient";
+import { Message } from "./Message";
+import { ReadState } from "./ReadState";
+import { Invite } from "./Invite";
+import { DmChannelDTO } from "../dtos";
+
+@Entity("security_settings")
+export class SecuritySettings extends BaseClass {
+
+  @Column({nullable: true})
+  guild_id: Snowflake;
+
+  @Column({nullable: true})
+  channel_id: Snowflake;
+
+  @Column()
+  encryption_permission_mask: BitField;
+
+  @Column()
+  allowed_algorithms: string[];
+
+  @Column()
+  current_algorithm: string;
+
+  @Column({nullable: true})
+  used_since_message: Snowflake;
+
+}