From a2bb8029fec5ade4c747bc368e9a9164e2c19c14 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 8 Aug 2014 15:28:39 -0400 Subject: [PATCH] use utils.toISOString --- src/messaging.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/messaging.js b/src/messaging.js index b220cbb728..9b74bc4df4 100644 --- a/src/messaging.js +++ b/src/messaging.js @@ -6,6 +6,7 @@ var db = require('./database'), user = require('./user'), plugins = require('./plugins'), meta = require('./meta'), + utils = require('../public/src/utils'), notifications = require('./notifications'), userNotifications = require('./user/notifications'); @@ -128,7 +129,7 @@ var db = require('./database'), var self = parseInt(message.fromuid, 10) === parseInt(fromuid, 10); message.fromUser = self ? userData[0] : userData[1]; message.toUser = self ? userData[1] : userData[0]; - message.timestampISO = new Date(parseInt(message.timestamp, 10)).toISOString(); + message.timestampISO = utils.toISOString(message.timestamp); message.self = self ? 1 : 0; message.newSet = false; @@ -260,7 +261,7 @@ var db = require('./database'), /* todo #1798 -- this utility method creates a room name given an array of uids. - + Messaging.uidsToRoom = function(uids, callback) { uid = parseInt(uid, 10); if (typeof uid === 'number' && Array.isArray(roomUids)) {