chat: highlight both public and faction user chat in the 'all' COMM tab, the same as in 'alerts' for @mention messages

This commit is contained in:
Jon Atkins 2015-01-22 20:56:51 +00:00
parent b54194efa4
commit 0b886c43f0

View File

@ -213,7 +213,7 @@ window.chat.handlePublic = function(data, olderMsgs) {
if(data.success.length === 0) return; if(data.success.length === 0) return;
var old = chat._public.oldestTimestamp; var old = chat._public.oldestTimestamp;
chat.writeDataToHash(data, chat._public, true, olderMsgs); chat.writeDataToHash(data, chat._public, undefined, olderMsgs); //NOTE: isPublic passed as undefined - this is the 'all' channel, so not really public or private
var oldMsgsWereAdded = old !== chat._public.oldestTimestamp; var oldMsgsWereAdded = old !== chat._public.oldestTimestamp;
runHooks('publicChatDataAvailable', {raw: data, processed: chat._public.data}); runHooks('publicChatDataAvailable', {raw: data, processed: chat._public.data});
@ -373,9 +373,9 @@ window.chat.writeDataToHash = function(newData, storageHash, isPublicChannel, is
//both the public and private channels //both the public and private channels
//we don't include this '[secure]' text above, as it's redundant in the faction-only channel //we don't include this '[secure]' text above, as it's redundant in the faction-only channel
//let's add it here though if we have a secure message in the public channel, or the reverse if a non-secure in the faction one //let's add it here though if we have a secure message in the public channel, or the reverse if a non-secure in the faction one
if (!systemNarrowcast && !(isPublicChannel===false) && isSecureMessage) msg = '<span style="color: #f88; background-color: #500;">[faction]</span> ' + msg; if (!auto && !(isPublicChannel===false) && isSecureMessage) msg = '<span style="color: #f88; background-color: #500;">[faction]</span> ' + msg;
//and, add the reverse - a 'public' marker to messages in the private channel //and, add the reverse - a 'public' marker to messages in the private channel
if (!systemNarrowcast && !(isPublicChannel===true) && (!isSecureMessage)) msg = '<span style="color: #ff6; background-color: #550">[public]</span> ' + msg; if (!auto && !(isPublicChannel===true) && (!isSecureMessage)) msg = '<span style="color: #ff6; background-color: #550">[public]</span> ' + msg;
// format: timestamp, autogenerated, HTML message // format: timestamp, autogenerated, HTML message