Temp fix for DMs

This commit is contained in:
Madeline 2023-01-12 00:32:24 +11:00
parent 68db12378d
commit da9ce34933

View File

@ -175,11 +175,12 @@ export async function onIdentify(this: WebSocket, data: Payload) {
})) as any as UserGuildSettings[]; })) as any as UserGuildSettings[];
const channels = recipients.map((x) => { const channels = recipients.map((x) => {
//TODO is this needed? check if users in group dm that are not friends are sent in the READY event //@ts-ignore
users = users.concat( x.channel.recipients = x.channel.recipients?.map((x) =>
x.channel.recipients?.map((x) => x.user.toPublicUser()) || [], x.user.toPublicUser(),
); );
// users = users.concat(x.channel.recipients); //TODO is this needed? check if users in group dm that are not friends are sent in the READY event
users = users.concat(x.channel.recipients as unknown as User[]);
if (x.channel.isDm()) { if (x.channel.isDm()) {
x.channel.recipients = x.channel.recipients!.filter( x.channel.recipients = x.channel.recipients!.filter(
(x) => x.id !== this.user_id, (x) => x.id !== this.user_id,