diff --git a/themes/chatview/psi/adapter.js b/themes/chatview/psi/adapter.js index bd526b7c0..a12670ad6 100644 --- a/themes/chatview/psi/adapter.js +++ b/themes/chatview/psi/adapter.js @@ -235,7 +235,7 @@ function psiThemeAdapter(chat) { if (this.name == "sender") { //may not be html d = chat.util.escapeHtml(d); } else if (d instanceof Date) { - // "date" and "time" variables use TemplateTimeVar. this is something unknown + chat.console("WARNING: " + this.name + " isn't handled by TemplateTimeVar"); d = chat.util.dateFormat(d, shared.dateTimeFormat); } else if (this.name == "avatarurl") { var url; diff --git a/themes/chatview/util.js b/themes/chatview/util.js index 65d3390a9..2e0a49338 100644 --- a/themes/chatview/util.js +++ b/themes/chatview/util.js @@ -981,6 +981,16 @@ ${info} } } + // we need "time" as Date for groupping. + if (data.time) { + data.time = new Date(data.time); + } + + // "date" is not really required that early but why not + if (data.date) { + data.date = new Date(data.date); + } + if (data.type == "message") { if (data.mtype == "join") { usersMap[data.sender] = {avatar:data.avatar, nickcolor:data.nickcolor, msgs:{}};