add hook for chat data

This commit is contained in:
Stefan Breunig
2013-02-18 11:12:26 +01:00
parent 4eb90976e3
commit 044b5f2147
2 changed files with 9 additions and 1 deletions

View File

@ -200,6 +200,8 @@ window.chat.handlePublic = function(data, textStatus, jqXHR) {
chat.writeDataToHash(data, chat._publicData, true);
var oldMsgsWereAdded = old !== chat.getOldestTimestamp(false);
runHooks('publicChatDataAvailable', {raw: data, processed: chat._publicData});
switch(chat.getActive()) {
case 'public': window.chat.renderPublic(oldMsgsWereAdded); break;
case 'compact': window.chat.renderCompact(oldMsgsWereAdded); break;