diff --git a/file/js/TimWolla.WCF.Chat.coffee b/file/js/TimWolla.WCF.Chat.coffee index 6614931..7e90398 100644 --- a/file/js/TimWolla.WCF.Chat.coffee +++ b/file/js/TimWolla.WCF.Chat.coffee @@ -16,6 +16,7 @@ TimWolla.WCF ?= {} title: document.title messageTemplate: null newMessageCount: null + events: { newMessage: $.Callbacks() } init: () -> @bindEvents() @refreshRoomList() @@ -175,6 +176,8 @@ TimWolla.WCF ?= {} ### handleMessages: (messages) -> for message in messages + @events.newMessage.fire message + output = @messageTemplate.fetch message li = $ '
' li.addClass 'chatMessage chatMessage'+message.type