summary refs log tree commit diff
path: root/src/gateway/opcodes/PresenceUpdate.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/gateway/opcodes/PresenceUpdate.ts')
-rw-r--r--src/gateway/opcodes/PresenceUpdate.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gateway/opcodes/PresenceUpdate.ts b/src/gateway/opcodes/PresenceUpdate.ts
index f31c9161..ad712234 100644
--- a/src/gateway/opcodes/PresenceUpdate.ts
+++ b/src/gateway/opcodes/PresenceUpdate.ts
@@ -1,4 +1,4 @@
-import { WebSocket, Payload } from "@fosscord/gateway";
+import { Payload, WebSocket } from "@fosscord/gateway";
 import { ActivitySchema, emitEvent, PresenceUpdateEvent, Session, User } from "@fosscord/util";
 import { check } from "./instanceOf";
 
@@ -6,10 +6,7 @@ export async function onPresenceUpdate(this: WebSocket, { d }: Payload) {
 	check.call(this, ActivitySchema, d);
 	const presence = d as ActivitySchema;
 
-	await Session.update(
-		{ session_id: this.session_id },
-		{ status: presence.status, activities: presence.activities }
-	);
+	await Session.update({ session_id: this.session_id }, { status: presence.status, activities: presence.activities });
 
 	await emitEvent({
 		event: "PRESENCE_UPDATE",
@@ -18,7 +15,7 @@ export async function onPresenceUpdate(this: WebSocket, { d }: Payload) {
 			user: await User.getPublicUser(this.user_id),
 			activities: presence.activities,
 			client_status: {}, // TODO:
-			status: presence.status,
-		},
+			status: presence.status
+		}
 	} as PresenceUpdateEvent);
 }