diff --git a/public/language/en_GB/topic.json b/public/language/en_GB/topic.json index 7669a23fe0..2af258a89d 100644 --- a/public/language/en_GB/topic.json +++ b/public/language/en_GB/topic.json @@ -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", diff --git a/src/socket.io/modules.js b/src/socket.io/modules.js index 9d8d233c64..bc243855ab 100644 --- a/src/socket.io/modules.js +++ b/src/socket.io/modules.js @@ -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; } diff --git a/src/topics/posts.js b/src/topics/posts.js index 6d59daf763..3062c5dfa9 100644 --- a/src/topics/posts.js +++ b/src/topics/posts.js @@ -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]]';