Baris Usakli 12 years ago
commit 1c27cbd90a

@ -20,11 +20,13 @@ var path = require('path'),
var categoryUrls = []; var categoryUrls = [];
categories.getAllCategories(function(data) { categories.getAllCategories(function(data) {
data.categories.forEach(function(category) { data.categories.forEach(function(category) {
categoryUrls.push({ if (!category.disabled) {
url: path.join('category', category.slug), categoryUrls.push({
changefreq: 'weekly', url: path.join('category', category.slug),
priority: '0.4' changefreq: 'weekly',
}); priority: '0.4'
});
}
}); });
next(null, categoryUrls); next(null, categoryUrls);
@ -34,11 +36,13 @@ var path = require('path'),
var topicUrls = []; var topicUrls = [];
topics.getAllTopics(null, null, function(topics) { topics.getAllTopics(null, null, function(topics) {
topics.forEach(function(topic) { topics.forEach(function(topic) {
topicUrls.push({ if (topic.deleted !== '1') {
url: path.join('topic', topic.slug), topicUrls.push({
changefreq: 'daily', url: path.join('topic', topic.slug),
priority: '0.6' changefreq: 'daily',
}); priority: '0.6'
});
}
}); });
next(null, topicUrls); next(null, topicUrls);

@ -532,10 +532,11 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
socket.join('chat_' + uids[0] + '_' + uids[1]); socket.join('chat_' + uids[0] + '_' + uids[1]);
user.getUserField(uid, 'username', function(err, username) { user.getUserField(uid, 'username', function(err, username) {
var finalMessage = 'New message from <strong>' + username + '</strong>'; var finalMessage = username + ': ' + msg,
notifText = 'New message from <strong>' + username + '</strong>';
if(!isUserOnline(touid)) { if(!isUserOnline(touid)) {
notifications.create(finalMessage, 5, '#', 'notification_' + uid + '_' + touid, function(nid) { notifications.create(notifText, 5, '#', 'notification_' + uid + '_' + touid, function(nid) {
notifications.push(nid, [touid], function(success) { notifications.push(nid, [touid], function(success) {
}); });

Loading…
Cancel
Save