diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-07 16:34:08 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-07 16:34:08 +1000 |
commit | 1ff18dbd39c616cc7be728f3a1e7f4f25cd6c2c3 (patch) | |
tree | c3f76a4dfb744fa6e1fe2e70db4a45a606cc5f05 | |
parent | Prettier (diff) | |
download | server-1ff18dbd39c616cc7be728f3a1e7f4f25cd6c2c3.tar.xz |
Allow spotify activities through schema
-rw-r--r-- | src/util/interfaces/Activity.ts | 9 | ||||
-rw-r--r-- | src/util/schemas/ActivitySchema.ts | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/util/interfaces/Activity.ts b/src/util/interfaces/Activity.ts index 3b36b4a6..39e944ed 100644 --- a/src/util/interfaces/Activity.ts +++ b/src/util/interfaces/Activity.ts @@ -33,6 +33,15 @@ export interface Activity { }; instance?: boolean; flags: string; // activity flags OR d together, describes what the payload includes + // spotify and other rich presence data + id?: string; + sync_id?: string; + metadata?: { + context_url?: string; + album_id?: string; + artist_ids?: string[]; + }, + session_id?: string; } export enum ActivityType { diff --git a/src/util/schemas/ActivitySchema.ts b/src/util/schemas/ActivitySchema.ts index d94557ea..b5b419a3 100644 --- a/src/util/schemas/ActivitySchema.ts +++ b/src/util/schemas/ActivitySchema.ts @@ -37,7 +37,16 @@ export const ActivitySchema = { $match: String }, $instance: Boolean, - $flags: String + $flags: String, + // spotify and other rich presence data + $id: String, + $sync_id: String, + $metadata: { + $context_url: String, + $album_id: String, + $artist_ids: [String], + }, + $session_id: String, } ], $since: Number // unix time (in milliseconds) of when the client went idle, or null if the client is not idle |