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:
Barış Soner Uşaklı
2026-03-09 08:17:40 -04:00
parent b9b63bf521
commit 304f89c0cf

View File

@@ -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}`;
} }
} }