Skip to content

Node.js based forum software built for the modern web

fix: dont add self username when clicking reply

Barış Soner Uşaklı9fcaad380b52
diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js
index 49a0e23be0..0e2fcce5d8 100644
--- a/public/src/client/topic/postTools.js
+++ b/public/src/client/topic/postTools.js
@@ -287,7 +287,9 @@ define('forum/topic/postTools', [
showStaleWarning(function () {
let username = getUserSlug(button);
- if (getData(button, 'data-uid') === '0' || !getData(button, 'data-userslug')) {
+ const postUid = getData(button, 'data-uid');
+ const isSelfPost = postUid === String(app.user.uid);
+ if (isSelfPost || postUid === '0' || !getData(button, 'data-userslug')) {
username = '';
}