mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-19 19:11:05 +01:00
fix: if quoting self, dont add @, but keep the username
without it self quotes look like "said: <rest of quote>"
This commit is contained in:
@@ -386,7 +386,8 @@ define('forum/topic/postTools', [
|
|||||||
return slug;
|
return slug;
|
||||||
}
|
}
|
||||||
const post = button.parents('[data-pid]');
|
const post = button.parents('[data-pid]');
|
||||||
if (post.length && !post.hasClass('self-post')) {
|
const isSelfPost = post.hasClass('self-post');
|
||||||
|
if (post.length) {
|
||||||
slug = slugify(post.attr('data-username'), true);
|
slug = slugify(post.attr('data-username'), true);
|
||||||
if (!slug) {
|
if (!slug) {
|
||||||
if (post.attr('data-uid') !== '0') {
|
if (post.attr('data-uid') !== '0') {
|
||||||
@@ -396,7 +397,7 @@ define('forum/topic/postTools', [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (slug && slug !== '[[global:former-user]]' && slug !== '[[global:guest]]') {
|
if (slug && slug !== '[[global:former-user]]' && slug !== '[[global:guest]]') {
|
||||||
slug = '@' + slug;
|
slug = isSelfPost ? slug : `@${slug}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user