fix(status): filter users by enabled status in follow repository query

This commit is contained in:
2025-11-03 11:46:53 +01:00
parent a593e05f5c
commit 0f22892816

View File

@@ -239,7 +239,7 @@ export class StatusService {
container.addTextDisplayComponents((text) => text.setContent(`${n.alive ? process.env.EMOJI_STATUS_ONLINE : process.env.EMOJI_STATUS_OFFLINE} **${n.name}** is now **${n.alive ? 'online' : 'offline'}**\n🏷 Type : ${n.type}\n🕒 Time : <t:${Math.round(new Date().getTime()/1000)}:R>`)); container.addTextDisplayComponents((text) => text.setContent(`${n.alive ? process.env.EMOJI_STATUS_ONLINE : process.env.EMOJI_STATUS_OFFLINE} **${n.name}** is now **${n.alive ? 'online' : 'offline'}**\n🏷 Type : ${n.type}\n🕒 Time : <t:${Math.round(new Date().getTime()/1000)}:R>`));
}); });
const users = await this.followRepo.find(); const users = await this.followRepo.find({where: {enable: true}});
const hosts = notifs.map((n) => n.host); const hosts = notifs.map((n) => n.host);
users.filter(v => hosts.includes(v.host)).forEach(async (user) => { users.filter(v => hosts.includes(v.host)).forEach(async (user) => {
try { try {