diff --git a/services/web/public/coffee/ide/chat/controllers/ChatController.coffee b/services/web/public/coffee/ide/chat/controllers/ChatController.coffee index 751d1746fd..401a9def27 100644 --- a/services/web/public/coffee/ide/chat/controllers/ChatController.coffee +++ b/services/web/public/coffee/ide/chat/controllers/ChatController.coffee @@ -5,9 +5,10 @@ define [ App.controller "ChatController", ($scope, chatMessages, @ide, $location) -> $scope.chat = chatMessages.state - $scope.$watchCollection "chat.messages", (messages) -> + $scope.$watch "chat.messages", (messages) -> if messages? $scope.$emit "messages:updated" + , true # Deep watch $scope.sendMessage = -> chatMessages diff --git a/services/web/public/coffee/ide/chat/services/chatMessages.coffee b/services/web/public/coffee/ide/chat/services/chatMessages.coffee index d63768db03..00d6c3bbf1 100644 --- a/services/web/public/coffee/ide/chat/services/chatMessages.coffee +++ b/services/web/public/coffee/ide/chat/services/chatMessages.coffee @@ -39,7 +39,6 @@ define [ TIMESTAMP_GROUP_SIZE = 5 * 60 * 1000 # 5 minutes prependMessage = (message) -> - console.log "PREPENDING MESSAGE", message firstMessage = chat.state.messages[0] shouldGroup = firstMessage? and firstMessage.user.id == message.user.id and