From 9f8f7b31e0a4ea7def796a2006c7803c43f5ac60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 23 Jun 2013 19:54:39 +0200 Subject: [PATCH] Set isFollowUp to allow checking whether a completely new message is wanted --- file/js/be.bastelstu.Chat.litcoffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/file/js/be.bastelstu.Chat.litcoffee b/file/js/be.bastelstu.Chat.litcoffee index e130464..92d275f 100644 --- a/file/js/be.bastelstu.Chat.litcoffee +++ b/file/js/be.bastelstu.Chat.litcoffee @@ -418,8 +418,9 @@ Insert the given messages into the chat stream. if lastMessage.type is message.type and lastMessage.sender is message.sender and lastMessage.receiver is message.receiver createNewMessage = no - output = v.messageTemplate.fetch message if createNewMessage + message.isFollowUp = no + output = v.messageTemplate.fetch message li = $ '
  • ' li.addClass 'timsChatMessage' li.addClass "timsChatMessage#{message.type}" @@ -429,6 +430,8 @@ Insert the given messages into the chat stream. li.appendTo $ '#timsChatMessageContainer > ul' else + message.isFollowUp = yes + output = v.messageTemplate.fetch message $('.timsChatMessage:last-child .text').append $(output).find('.text li:last-child') lastMessage = message