From d2f216a974b51f36609e9a2c789cf8873f55f0e5 Mon Sep 17 00:00:00 2001 From: wolfy01 <45273698+wolfy01@users.noreply.github.com> Date: Tue, 7 Apr 2020 02:42:49 -0400 Subject: [PATCH] room quota --- src/Message.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Message.js b/src/Message.js index 874b233..ea4ee86 100644 --- a/src/Message.js +++ b/src/Message.js @@ -23,6 +23,7 @@ module.exports = (cl) => { }]) }) cl.on("ch", msg => { + if (!cl.quotas.room.attempt()) return; if (!msg.hasOwnProperty("set") || !msg.set) msg.set = {}; if (msg.hasOwnProperty("_id") && typeof msg._id == "string") { if (msg._id.length > 512) return;