From 0b886c43f04439be47a8e8595d0d2147bddec8c4 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Thu, 22 Jan 2015 20:56:51 +0000 Subject: [PATCH] chat: highlight both public and faction user chat in the 'all' COMM tab, the same as in 'alerts' for @mention messages --- code/chat.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/chat.js b/code/chat.js index 928092a7..d554984f 100644 --- a/code/chat.js +++ b/code/chat.js @@ -213,7 +213,7 @@ window.chat.handlePublic = function(data, olderMsgs) { if(data.success.length === 0) return; 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; 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 //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 - if (!systemNarrowcast && !(isPublicChannel===false) && isSecureMessage) msg = '[faction] ' + msg; + if (!auto && !(isPublicChannel===false) && isSecureMessage) msg = '[faction] ' + msg; //and, add the reverse - a 'public' marker to messages in the private channel - if (!systemNarrowcast && !(isPublicChannel===true) && (!isSecureMessage)) msg = '[public] ' + msg; + if (!auto && !(isPublicChannel===true) && (!isSecureMessage)) msg = '[public] ' + msg; // format: timestamp, autogenerated, HTML message