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:
parent
b54194efa4
commit
0b886c43f0
@ -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 = '<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
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user