Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit c4b4434f authored by echicken's avatar echicken 🐔

scan_threads doesn't need offset or page size

parent b0f8932a
......@@ -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;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment