Skip to content

Commit

Permalink
Temp fix for DMs
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyUnderStars authored and erkinalp committed Jan 14, 2023
1 parent 712ee79 commit 77b0ce8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gateway/opcodes/Identify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ export async function onIdentify(this: WebSocket, data: Payload) {
})) as any as UserGuildSettings[];

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
users = users.concat(
x.channel.recipients?.map((x) => x.user.toPublicUser()) || [],
//@ts-ignore
x.channel.recipients = x.channel.recipients?.map((x) =>
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()) {
x.channel.recipients = x.channel.recipients!.filter(
(x) => x.id !== this.user_id,
Expand Down

0 comments on commit 77b0ce8

Please sign in to comment.