fix(sending): Do not count sending limits twice (#505)

This commit is contained in:
Andris Reinman 2023-09-28 13:34:29 +03:00 committed by GitHub
parent e43ba60069
commit b9349f6e83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2326,7 +2326,7 @@ module.exports = (db, server, messageHandler, userHandler, storageHandler, setti
let limitCheck;
try {
limitCheck = await messageHandler.counters.asyncTTLCounter('wdr:' + userData._id.toString(), envelope.to.length, maxRecipients, false);
limitCheck = await messageHandler.counters.asyncTTLCounter('wdr:' + userData._id.toString(), 0, maxRecipients, false);
} catch (err) {
res.status(500);
return res.json({