Skip to content

Node.js based forum software built for the modern web

fix: parseInt cutoff

Barış Soner Uşaklı0e5e47f41036
diff --git a/src/topics/unread.js b/src/topics/unread.js
index 3fe687238d..2c793c4c9f 100644
--- a/src/topics/unread.js
+++ b/src/topics/unread.js
@@ -49,7 +49,7 @@ module.exports = function (Topics) {
Topics.unreadCutoff = async function (uid) {
const cutoff = Date.now() - (meta.config.unreadCutoff * 86400000);
const data = await plugins.fireHook('filter:topics.unreadCutoff', { uid: uid, cutoff: cutoff });
- return data.cutoff;
+ return parseInt(data.cutoff, 10);
};
Topics.getUnreadTids = async function (params) {