workaround for mongodb being wack

This commit is contained in:
Lea 2023-05-06 20:48:00 +02:00 committed by GitHub
parent 5bf7852f22
commit 51fb5dc25e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,6 +267,11 @@ const notifyPublicServers = async () => {
try { try {
logger.info(`Sending notification to owner of server ${serverConfig.id}`); logger.info(`Sending notification to owner of server ${serverConfig.id}`);
if (serverConfig.discoverAutospamNotify) {
logger.warn('This server already received the message');
continue;
}
await dbs.SERVERS.update( await dbs.SERVERS.update(
{ id: serverConfig.id }, { id: serverConfig.id },
{ $set: { discoverAutospamNotify: true, antispamEnabled: true, allowBlacklistedUsers: false } }, { $set: { discoverAutospamNotify: true, antispamEnabled: true, allowBlacklistedUsers: false } },