mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 03:33:33 +01:00
Temp fix for DMs
This commit is contained in:
parent
68db12378d
commit
da9ce34933
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user