Commit 203f87d2e99357a2eab08025c5e4bb5f53084871
1 parent
45949f52
Exists in
staging
and in
3 other branches
chat: not group messages sent by the same user
This was done with the intention of saving vertical space, but the users are getting confused so we'll just leave one ballon per message.
Showing
1 changed file
with
11 additions
and
15 deletions
Show diff stats
public/javascripts/chat.js
... | ... | @@ -147,22 +147,18 @@ jQuery(function($) { |
147 | 147 | if(offset_container.length == 0) |
148 | 148 | offset_container = $('<div class="chat-offset-container-'+offset+'"></div>').prependTo(history); |
149 | 149 | |
150 | - if (offset_container.find('.message:last').attr('data-who') == who) { | |
151 | - offset_container.find('.message:last .content').append('<p>' + body + '</p>'); | |
152 | - } | |
153 | - else { | |
154 | - if (time==undefined) { | |
155 | - time = new Date().toISOString(); | |
156 | - } | |
157 | - var message_html = Jabber.template('.message') | |
158 | - .replace('%{message}', body) | |
159 | - .replace(/%{who}/g, who) | |
160 | - .replace('%{time}', time) | |
161 | - .replace('%{name}', name) | |
162 | - .replace('%{avatar}', getAvatar(identifier)); | |
163 | - offset_container.append(message_html); | |
164 | - $(".message span.time").timeago(); | |
150 | + if (time==undefined) { | |
151 | + time = new Date().toISOString(); | |
165 | 152 | } |
153 | + var message_html = Jabber.template('.message') | |
154 | + .replace('%{message}', body) | |
155 | + .replace(/%{who}/g, who) | |
156 | + .replace('%{time}', time) | |
157 | + .replace('%{name}', name) | |
158 | + .replace('%{avatar}', getAvatar(identifier)); | |
159 | + offset_container.append(message_html); | |
160 | + $(".message span.time").timeago(); | |
161 | + | |
166 | 162 | if(offset == 0) history.scrollTo({top:'100%', left:'0%'}); |
167 | 163 | else history.scrollTo(offset_container.height()); |
168 | 164 | if (who != "self") { | ... | ... |