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