Skip to content

Node.js based forum software built for the modern web

chat edit fixes

pichalitef6375211051e
diff --git a/public/language/en_GB/error.json b/public/language/en_GB/error.json
index dbf6c56925..e52b7767b1 100644
--- a/public/language/en_GB/error.json
+++ b/public/language/en_GB/error.json
@@ -106,6 +106,7 @@
"chat-message-too-long": "Chat message is too long",
"cant-edit-chat-message": "You are not allowed to edit this message",
"cant-remove-last-user": "You can't remove the last user",
+ "cant-delete-chat-message": "You are not allowed to delete this message",
"reputation-system-disabled": "Reputation system is disabled.",
"downvoting-disabled": "Downvoting is disabled",
@@ -122,5 +123,6 @@
"invite-maximum-met": "You have invited the maximum amount of people (%1 out of %2).",
- "no-session-found": "No login session found!"
+ "no-session-found": "No login session found!",
+ "not-in-room": "User not in room"
}
diff --git a/public/src/client/chats.js b/public/src/client/chats.js
index f29ff0cc3e..1508af97d3 100644
--- a/public/src/client/chats.js
+++ b/public/src/client/chats.js
@@ -392,6 +392,8 @@ define('forum/chats', ['components', 'string', 'sounds', 'forum/infinitescroll',
Chats.onChatEdit = function() {
socket.on('event:chats.edit', function(data) {
data.messages.forEach(function(message) {
+ var self = parseInt(message.fromuid, 10) === parseInt(app.user.uid);
+ message.self = self ? 1 : 0;
templates.parse('partials/chat_message', {
messages: message
}, function(html) {