|
@@ -85,8 +85,8 @@ function setVisualNotification(show) {
|
85
|
85
|
* Returns the current time in the format it is shown to the user
|
86
|
86
|
* @returns {string}
|
87
|
87
|
*/
|
88
|
|
-function getCurrentTime() {
|
89
|
|
- var now = new Date();
|
|
88
|
+function getCurrentTime(stamp) {
|
|
89
|
+ var now = (stamp? new Date(stamp): new Date());
|
90
|
90
|
var hour = now.getHours();
|
91
|
91
|
var minute = now.getMinutes();
|
92
|
92
|
var second = now.getSeconds();
|
|
@@ -228,7 +228,7 @@ var Chat = (function (my) {
|
228
|
228
|
/**
|
229
|
229
|
* Appends the given message to the chat conversation.
|
230
|
230
|
*/
|
231
|
|
- my.updateChatConversation = function (from, displayName, message) {
|
|
231
|
+ my.updateChatConversation = function (from, displayName, message, myjid, stamp) {
|
232
|
232
|
var divClassName = '';
|
233
|
233
|
|
234
|
234
|
if (APP.xmpp.myJid() === from) {
|
|
@@ -256,7 +256,7 @@ var Chat = (function (my) {
|
256
|
256
|
'<div class="chatmessage">'+
|
257
|
257
|
'<img src="../images/chatArrow.svg" class="chatArrow">' +
|
258
|
258
|
'<div class="username ' + divClassName +'">' + escDisplayName +
|
259
|
|
- '</div>' + '<div class="timestamp">' + getCurrentTime() +
|
|
259
|
+ '</div>' + '<div class="timestamp">' + getCurrentTime(stamp) +
|
260
|
260
|
'</div>' + '<div class="usermessage">' + message + '</div>' +
|
261
|
261
|
'</div>';
|
262
|
262
|
|