1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Set isFollowUp to allow checking whether a completely new message is wanted

This commit is contained in:
Tim Düsterhus 2013-06-23 19:54:39 +02:00
parent 42ef646685
commit 9f8f7b31e0

View File

@ -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></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