Node.js based forum software built for the modern web
changed user posted notification to include title
barisusaklic9fb5b3e1138
diff --git a/public/language/en_GB/notifications.json b/public/language/en_GB/notifications.jsonindex c6e16c9f55..4f495e87a1 100644--- a/public/language/en_GB/notifications.json+++ b/public/language/en_GB/notifications.json@@ -11,7 +11,6 @@"new_notification": "New Notification","you_have_unread_notifications": "You have unread notifications.",- "user_made_post": "<strong>%1</strong> made a new post","new_message_from": "New message from <strong>%1</strong>","upvoted_your_post": "<strong>%1</strong> has upvoted your post.","favourited_your_post": "<strong>%1</strong> has favourited your post.",diff --git a/src/user/notifications.js b/src/user/notifications.jsindex abfcfecf90..d4f1b79708 100644--- a/src/user/notifications.js+++ b/src/user/notifications.js@@ -156,7 +156,7 @@ var async = require('async'),async.parallel({username: async.apply(user.getUserField, uid, 'username'),- topic: async.apply(topics.getTopicFields, tid, ['slug', 'cid']),+ topic: async.apply(topics.getTopicFields, tid, ['slug', 'cid', 'title']),postIndex: async.apply(posts.getPidIndex, pid),postContent: function(next) {async.waterfall([@@ -165,14 +165,21 @@ var async = require('async'),postTools.parse(content, next);}], next);+ },+ topicFollowers: function(next) {+ db.isSetMembers('tid:' + tid + ':followers', followers, next);}}, function(err, results) {if (err) {return;}+ followers = followers.filter(function(value, index) {+ return !results.topicFollowers[index];+ });+notifications.create({- bodyShort: '[[notifications:user_made_post, ' + results.username + ']]',+ bodyShort: '[[notifications:user_posted_to, ' + results.username + ', ' + results.topic.title + ']]',bodyLong: results.postContent,path: nconf.get('relative_path') + '/topic/' + results.topic.slug + '/' + results.postIndex,uniqueId: 'topic:' + tid,