|
|
@ -144,7 +144,6 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var onMessage = function (data, cb) {
|
|
|
|
var onMessage = function (data, cb) {
|
|
|
|
// data = { type: 'type', content: {msg: 'msg', hash: 'hash'} }
|
|
|
|
// data = { type: 'type', content: {msg: 'msg', hash: 'hash'} }
|
|
|
|
console.debug(data.type, data.content);
|
|
|
|
|
|
|
|
pushMessage(data);
|
|
|
|
pushMessage(data);
|
|
|
|
if (data.content && typeof (data.content.getFormatText) === "function") {
|
|
|
|
if (data.content && typeof (data.content.getFormatText) === "function") {
|
|
|
|
var text = $('<div>').html(data.content.getFormatText()).text();
|
|
|
|
var text = $('<div>').html(data.content.getFormatText()).text();
|
|
|
@ -188,7 +187,6 @@ define([
|
|
|
|
onMessageHandlers.push(function (data, el) {
|
|
|
|
onMessageHandlers.push(function (data, el) {
|
|
|
|
var type = data.type;
|
|
|
|
var type = data.type;
|
|
|
|
if (types.indexOf(type) === -1 && !(teams && /^team-/.test(type))) { return; }
|
|
|
|
if (types.indexOf(type) === -1 && !(teams && /^team-/.test(type))) { return; }
|
|
|
|
console.log('okokok');
|
|
|
|
|
|
|
|
cfg.onMessage(data, el);
|
|
|
|
cfg.onMessage(data, el);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|