Node.js based forum software built for the modern web
removed incorrect markread nid
barisusaklib807915515a3
diff --git a/src/messaging.js b/src/messaging.jsindex 494a354da0..d5d43e1041 100644--- a/src/messaging.js+++ b/src/messaging.js@@ -46,7 +46,6 @@ var userNotifications = require('./user/notifications');var isNew = params.isNew || false;var start = params.hasOwnProperty('start') ? params.start : 0;var stop = parseInt(start, 10) + ((params.count || 50) - 1);- var markRead = params.markRead || true;var indices = {};async.waterfall([@@ -79,16 +78,6 @@ var userNotifications = require('./user/notifications');next(null, messageData);}], callback);-- if (markRead) {- notifications.markRead('chat_' + roomId + '_' + uid, uid, function (err) {- if (err) {- winston.error('[messaging] Could not mark notifications related to this chat as read: ' + err.message);- }-- userNotifications.pushCount(uid);- });- }};function canGetMessages(callerUid, uid, callback) {diff --git a/src/socket.io/modules.js b/src/socket.io/modules.jsindex 46f3804c03..c8862c4941 100644--- a/src/socket.io/modules.js+++ b/src/socket.io/modules.js@@ -330,14 +330,9 @@ SocketModules.chats.getMessages = function (socket, data, callback) {uid: data.uid,roomId: data.roomId,start: parseInt(data.start, 10) || 0,- count: 50,- markRead: false+ count: 50};- if (data.hasOwnProperty('markRead')) {- params.markRead = data.markRead;- }-Messaging.getMessages(params, callback);};diff --git a/test/messaging.js b/test/messaging.jsindex 16f611821d..06991b2088 100644--- a/test/messaging.js+++ b/test/messaging.js@@ -126,8 +126,7 @@ describe('Messaging Library', function () {socketModules.chats.getMessages({uid: fooUid}, {uid: fooUid,roomId: roomId,- start: 0,- markRead: true+ start: 0}, function (err, messages) {assert.ifError(err);assert(Array.isArray(messages));