1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-05 10:22:31 +01:00
This commit is contained in:
Madeline 2023-08-21 23:28:36 +10:00
parent 2cf3833499
commit ccc774168a
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47

View File

@ -17,43 +17,43 @@
*/ */
import { import {
WebSocket,
Payload,
setupListener,
Capabilities,
CLOSECODES, CLOSECODES,
Capabilities,
OPCODES, OPCODES,
Payload,
Send, Send,
WebSocket,
setupListener,
} from "@spacebar/gateway"; } from "@spacebar/gateway";
import { import {
checkToken, Application,
Config,
DMChannel,
DefaultUserGuildSettings,
EVENTEnum,
Guild,
GuildOrUnavailable,
IdentifySchema,
Intents, Intents,
Member, Member,
ReadyEventData,
Session,
EVENTEnum,
Config,
PublicUser,
PrivateUserProjection,
ReadState,
Application,
emitEvent,
SessionsReplace,
PrivateSessionProjection,
MemberPrivateProjection, MemberPrivateProjection,
PresenceUpdateEvent,
IdentifySchema,
DefaultUserGuildSettings,
ReadyGuildDTO,
Guild,
PublicUserProjection,
ReadyUserGuildSettingsEntries,
UserSettings,
Permissions,
DMChannel,
GuildOrUnavailable,
Recipient,
OPCodes, OPCodes,
Permissions,
PresenceUpdateEvent,
PrivateSessionProjection,
PrivateUserProjection,
PublicUser,
PublicUserProjection,
ReadState,
ReadyEventData,
ReadyGuildDTO,
ReadyUserGuildSettingsEntries,
Recipient,
Session,
SessionsReplace,
UserSettings,
checkToken,
emitEvent,
} from "@spacebar/util"; } from "@spacebar/util";
import { check } from "./instanceOf"; import { check } from "./instanceOf";
@ -332,7 +332,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
// TODO how is active determined? // TODO how is active determined?
// in our lazy request impl, we just pick the 'most relevant' session // in our lazy request impl, we just pick the 'most relevant' session
active: x.session_id == session.session_id, active: x.session_id == session.session_id,
activities: x.activities, activities: x.activities ?? [],
client_info: x.client_info, client_info: x.client_info,
// TODO: what does all mean? // TODO: what does all mean?
session_id: x.session_id == session.session_id ? "all" : x.session_id, session_id: x.session_id == session.session_id ? "all" : x.session_id,