summary refs log tree commit diff
path: root/gateway/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-17 00:38:56 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-17 00:38:56 +0200
commit116e17f6d09a7687cdf69ff8aafc317600a09471 (patch)
tree557947452a24b359136cf3ba64e42afaa84489cb /gateway/src
parent:zap: improve performance of identify + listener (diff)
downloadserver-116e17f6d09a7687cdf69ff8aafc317600a09471.tar.xz
:sparkles: added session + memberlist event
Diffstat (limited to 'gateway/src')
-rw-r--r--gateway/src/schema/Activity.ts39
-rw-r--r--gateway/src/schema/Emoji.ts11
2 files changed, 3 insertions, 47 deletions
diff --git a/gateway/src/schema/Activity.ts b/gateway/src/schema/Activity.ts

index f1665efd..e8763046 100644 --- a/gateway/src/schema/Activity.ts +++ b/gateway/src/schema/Activity.ts
@@ -1,4 +1,4 @@ -import { EmojiSchema } from "./Emoji"; +import { Activity, Status } from "@fosscord/util"; export const ActivitySchema = { afk: Boolean, @@ -47,40 +47,7 @@ export const ActivitySchema = { export interface ActivitySchema { afk: boolean; - status: string; - activities?: [ - { - name: string; // the activity's name - type: number; // activity type // TODO: check if its between range 0-5 - url?: string; // stream url, is validated when type is 1 - created_at?: number; // unix timestamp of when the activity was added to the user's session - timestamps?: { - // unix timestamps for start and/or end of the game - start: number; - end: number; - }; - application_id?: string; // application id for the game - details?: string; - state?: string; - emoji?: EmojiSchema; - party?: { - id?: string; - size?: [number]; // used to show the party's current and maximum size // TODO: array length 2 - }; - assets?: { - large_image?: string; // the id for a large asset of the activity, usually a snowflake - large_text?: string; // text displayed when hovering over the large image of the activity - small_image?: string; // the id for a small asset of the activity, usually a snowflake - small_text?: string; // text displayed when hovering over the small image of the activity - }; - secrets?: { - join?: string; // the secret for joining a party - spectate?: string; // the secret for spectating a game - match?: string; // the secret for a specific instanced match - }; - instance?: boolean; - flags: string; // activity flags OR d together, describes what the payload includes - } - ]; + status: Status; + activities?: Activity[]; since?: number; // unix time (in milliseconds) of when the client went idle, or null if the client is not idle } diff --git a/gateway/src/schema/Emoji.ts b/gateway/src/schema/Emoji.ts deleted file mode 100644
index 413b8359..00000000 --- a/gateway/src/schema/Emoji.ts +++ /dev/null
@@ -1,11 +0,0 @@ -export const EmojiSchema = { - name: String, // the name of the emoji - $id: String, // the id of the emoji - animated: Boolean, // whether this emoji is animated -}; - -export interface EmojiSchema { - name: string; - id?: string; - animated: Boolean; -}