Mitigate issue where channel owner won't get certificate of award, but everyone else would

This commit is contained in:
Hri7566 2024-07-13 15:18:58 -04:00
parent 58dff7005d
commit c7bad077fc
1 changed files with 11 additions and 2 deletions

View File

@ -958,12 +958,21 @@ export class Channel extends EventEmitter {
});
if (banner == _id) {
this.sendNotification({
const certificate = {
title: "Certificate of Award",
text: `Let it be known that ${p.name} kickbanned him/her self.`,
duration: 7000,
target: "#room"
});
};
this.sendNotification(certificate);
for (const s of socketsBySocketID.values()) {
const userID = s.getUserID();
if (!userID) continue;
if (userID !== banner) continue;
s.sendNotification(certificate);
}
}
}
}