mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-01 00:58:53 +02:00
closes #1427
flag and chat buttons are hidden on self posts, updated in vanilla and lavender
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
"profile": "Profile",
|
||||
"posted_by": "Posted by %1",
|
||||
"posted_by_guest": "Posted by Guest",
|
||||
"chat": "Chat",
|
||||
"notify_me": "Be notified of new replies in this topic",
|
||||
"quote": "Quote",
|
||||
|
||||
@@ -162,7 +162,7 @@ SocketModules.chats.send = function(socket, data, callback) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
var touid = data.touid;
|
||||
var touid = parseInt(data.touid, 10);
|
||||
if (touid === socket.uid || socket.uid === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ module.exports = function(Topics) {
|
||||
postData[i].votes = postData[i].votes || 0;
|
||||
postData[i].display_moderator_tools = parseInt(uid, 10) !== 0 && results.privileges[i].editable;
|
||||
postData[i].display_move_tools = results.privileges[i].move;
|
||||
postData[i].selfPost = parseInt(uid, 10) === parseInt(postData[i].uid, 10);
|
||||
|
||||
if(postData[i].deleted && !results.privileges[i].view_deleted) {
|
||||
postData[i].content = '[[topic:post_is_deleted]]';
|
||||
|
||||
Reference in New Issue
Block a user