Skip to content
Snippets Groups Projects

webv4 header should show count for unread mail instead of all mail (using new...

Merged Kayz requested to merge mlong/webv4mail into master
1 unresolved thread
Files
3
+ 1
1
@@ -6,7 +6,7 @@ function cycle() {
if (user.number < 1 || user.alias == settings.guest) return;
if (time() - last_run <= frequency) return;
last_run = time();
const count = user.stats.mail_waiting;
const count = user.stats.unread_mail_waiting;
    • Ideally, you would make something like this backwards compatible:

      const count = typeof user.stats.unread_mail_waiting === "undefined" ? user.stats.mail_waiting : user.stats.unread_mail_waiting;

      So if someone wanted to, they could run newer ecweb with older sbbs. There may be other reasons preventing use with the current webv4 with older sbbs however.

Please register or sign in to reply
if (count > 0 || (count == 0 && last_count > 0)) {
emit({ event: 'mail', data: JSON.stringify({ count: count })});
}
Loading