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 7bdab92a authored by echicken's avatar echicken 🐔

Removed getMailUnreadCount() function.

API (if anything is using it) will return user.stats.mail_waiting for a real user.
parent 5d99166a
......@@ -242,22 +242,6 @@ function getUserPollData(sub, id) {
return ret;
}
function getMailUnreadCount() {
var count = 0;
var msgBase = new MsgBase('mail');
msgBase.open();
for (var m = msgBase.first_msg; m <= msgBase.last_msg; m++) {
var index = msgBase.get_msg_header(m);
if (index === null) continue;
if (index.to_ext != user.number) continue;
if (index.attr&MSG_READ) continue;
if (index.attr&MSG_DELETE) continue;
count++;
}
msgBase.close();
return count;
}
function getMailHeaders(sent, ascending) {
if (typeof sent !== 'undefined' &&
sent &&
......
......@@ -27,7 +27,7 @@ if ((http_request.method === 'GET' || http_request.method === 'POST') &&
switch(http_request.query.call[0].toLowerCase()) {
case 'get-mail-unread-count':
reply.count = getMailUnreadCount();
reply.count = user.stats.mail_waiting;
break;
case 'get-mail-body':
......
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