check if user exists

This commit is contained in:
barisusakli
2015-10-02 17:31:18 -04:00
parent 8e06ff49f3
commit 5cf983dcee
2 changed files with 16 additions and 3 deletions

View File

@@ -71,9 +71,12 @@ SocketModules.chats.canMessage = function(socket, toUid, callback) {
SocketModules.chats.markRead = function(socket, touid, callback) {
Messaging.markRead(socket.uid, touid, function(err) {
if (!err) {
Messaging.pushUnreadCount(socket.uid);
if (err) {
return callback(err);
}
Messaging.pushUnreadCount(socket.uid);
callback();
});
};