From 6cf0e687b74cfef3aaa451612445316c757e8819 Mon Sep 17 00:00:00 2001 From: David Cormier Date: Sun, 28 Jul 2013 00:01:35 -0400 Subject: [PATCH] Adds prefix to chat messages --- js/websockets.js | 5 ++++- websockets.html | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/websockets.js b/js/websockets.js index 182c6e8..d47a900 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -168,8 +168,11 @@ weechat.factory('connection', ['$rootScope', 'colors', function($scope, colors) var handleBufferLineAdded = function(message) { - var buffer_line = colors.parse(message['objects'][0]['content'][0]['message']); + + var prefix = colors.parse(message['objects'][0]['content'][0]['prefix']); + var message = colors.parse(message['objects'][0]['content'][0]['message']); + var buffer_line = _.union(prefix, message); $scope.buffer.push(buffer_line); } diff --git a/websockets.html b/websockets.html index 7319135..aa1c94c 100644 --- a/websockets.html +++ b/websockets.html @@ -40,9 +40,9 @@

-

- {{ part.text }} -
+ + {{ part.text }} +