Merge pull request #4234 from pichalite/chat-fixes

chat edit fixes
v1.18.x
Barış Soner Uşaklı 9 years ago
commit d43a45d0b8

@ -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"
}

@ -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) {

Loading…
Cancel
Save