1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 10:22:39 +01:00

send disclosure for pomelo

This commit is contained in:
Puyodead1 2023-12-23 17:10:55 -05:00
parent d88e9273ff
commit 2acf80acb6
No known key found for this signature in database
GPG Key ID: BA5F91AAEF68E5CE

View File

@ -464,6 +464,10 @@ export async function onIdentify(this: WebSocket, data: Payload) {
); );
// TODO: ready supplemental // TODO: ready supplemental
const disclosures = [];
// this tells the client the user can migrate
if (Config.get().general.uniqueUsernames) disclosures.push("pomelo");
await Send(this, { await Send(this, {
op: OPCodes.DISPATCH, op: OPCodes.DISPATCH,
t: EVENTEnum.ReadySupplemental, t: EVENTEnum.ReadySupplemental,
@ -478,7 +482,7 @@ export async function onIdentify(this: WebSocket, data: Payload) {
lazy_private_channels: [], lazy_private_channels: [],
guilds: [], // { voice_states: [], id: string, embedded_activities: [] } guilds: [], // { voice_states: [], id: string, embedded_activities: [] }
// embedded_activities are users currently in an activity? // embedded_activities are users currently in an activity?
disclose: [], // Config.get().general.uniqueUsernames ? ["pomelo"] : [] disclose: disclosures,
}, },
}); });