diff --git a/webv4/lib/events/forum.js b/webv4/lib/events/forum.js index c7719bf32ffdb3e80aed289b10ced3fb4d1cf526..defa066d31e2ef076be7eae7c556957aa12f5446 100644 --- a/webv4/lib/events/forum.js +++ b/webv4/lib/events/forum.js @@ -21,7 +21,13 @@ function shallow_diff(a, b) { } function forum_emit(evt, data) { - emit({ event: 'forum', data: JSON.stringify({ type: evt, data: data }) }); + emit({ + event: 'forum', + data: JSON.stringify({ + type: evt, + data: data + }) + }); } function scan_groups() { @@ -46,8 +52,8 @@ function scan_subs(group) { last_subs = scan; } -function scan_threads(sub, offset, page_size) { - const scan = getThreadStats(sub, offset, page_size, !is_real_user); +function scan_threads(sub) { + const scan = getThreadStats(sub, !is_real_user); if (!last_threads) { forum_emit('threads', scan); } else { @@ -71,7 +77,7 @@ function cycle() { last_run = time(); if (is_real_user && Request.has_param('groups_unread')) scan_groups(); if (is_real_user && Request.has_param('subs_unread')) scan_subs(Request.get_param('subs_unread')); - if (Request.has_param('threads')) scan_threads(Request.get_param('threads'), Request.get_param('offset'), Request.get_param('page_size')); + if (Request.has_param('sub')) scan_threads(Request.get_param('sub')); } this;