Skip to content
Snippets Groups Projects
Commit 9a92a3a2 authored by rswindell's avatar rswindell
Browse files

Check the data/msgs/*.msg file size (> 0) rather than just existence.

0-byte .msg files are normal and do not mean a msg is waiting for the user.
parent 3a3d9792
No related branches found
No related tags found
No related merge requests found
......@@ -257,7 +257,7 @@ function web_users(max_inactivity)
location: user.location,
logontime: file_date(e), // TODO: this is probably not the actual logon time, but more like "last activity" time (?)
do_not_disturb: (user.chat_settings & CHAT_NOPAGE) ? true : undefined,
msg_waiting: file_exists(format(system.data_dir + "msgs/%04u.msg", un)) ? true : undefined
msg_waiting: (file_size(format(system.data_dir + "msgs/%04u.msg", un)) > 0) ? true : undefined
});
});
return users;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment