mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
more link fixes
This commit is contained in:
@@ -114,9 +114,14 @@ function sendNotificationToPostOwner(data, uid, notification) {
|
||||
return;
|
||||
}
|
||||
|
||||
var path = nconf.get('relative_path') + '/topic/' + results.slug;
|
||||
if (parseInt(results.index, 10)) {
|
||||
path += '/' + (parseInt(results.index, 10) + 1);
|
||||
}
|
||||
|
||||
notifications.create({
|
||||
text: '[[' + notification + ', ' + results.username + ']]',
|
||||
path: nconf.get('relative_path') + '/topic/' + results.slug + '/' + results.index,
|
||||
path: path,
|
||||
uniqueId: 'post:' + data.pid,
|
||||
from: uid
|
||||
}, function(nid) {
|
||||
@@ -284,7 +289,7 @@ SocketPosts.flag = function(socket, pid, callback) {
|
||||
posts.getPidIndex(pid, next);
|
||||
},
|
||||
function(postIndex, next) {
|
||||
path += '/' + postIndex;
|
||||
path += '/' + (parseInt(postIndex, 10) + 1);
|
||||
groups.get('administrators', {}, next);
|
||||
},
|
||||
function(adminGroup, next) {
|
||||
|
||||
@@ -38,9 +38,13 @@ module.exports = function(Topics) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
var path = nconf.get('relative_path') + '/topic/' + results.topicData.slug;
|
||||
if (parseInt(results.postIndex, 10)) {
|
||||
path += '/' + (parseInt(results.postIndex, 10) + 1);
|
||||
}
|
||||
notifications.create({
|
||||
text: '[[notifications:user_posted_to, ' + results.username + ', ' + results.topicData.title + ']]',
|
||||
path: nconf.get('relative_path') + '/topic/' + results.topicData.slug + '/' + results.postIndex,
|
||||
path: path,
|
||||
uniqueId: 'topic:' + tid,
|
||||
from: exceptUid
|
||||
}, function(nid) {
|
||||
|
||||
@@ -153,7 +153,7 @@ var async = require('async'),
|
||||
}
|
||||
|
||||
async.parallel({
|
||||
usename: function(next) {
|
||||
username: function(next) {
|
||||
user.getUserField(uid, 'username', next);
|
||||
},
|
||||
slug: function(next) {
|
||||
@@ -168,10 +168,13 @@ var async = require('async'),
|
||||
}
|
||||
|
||||
var message = '[[notifications:user_made_post, ' + results.username + ']]';
|
||||
|
||||
var path = nconf.get('relative_path') + '/topic/' + results.slug + '/' + results.postIndex;
|
||||
if (parseInt(results.postIndex, 10)) {
|
||||
path += '/' + (parseInt(results.postIndex, 10) + 1);
|
||||
}
|
||||
notifications.create({
|
||||
text: message,
|
||||
path: nconf.get('relative_path') + '/topic/' + results.slug + '/' + results.postIndex,
|
||||
path: path,
|
||||
uniqueId: 'topic:' + tid,
|
||||
from: uid
|
||||
}, function(nid) {
|
||||
|
||||
Reference in New Issue
Block a user