mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 12:03:11 +00:00
Restore custom highlights functionality
This commit is contained in:
parent
2b653a30d6
commit
987cc6d3b4
1 changed files with 9 additions and 0 deletions
|
@ -49,6 +49,15 @@ socket.on("msg", function(data) {
|
|||
}
|
||||
}
|
||||
|
||||
// See if any of the custom highlight regexes match
|
||||
// TODO: This needs to be done on the server side with settings sync
|
||||
if (!data.msg.highlight && !data.msg.self
|
||||
&& (data.msg.type === "message" || data.msg.type === "notice")
|
||||
&& options.highlightsRE
|
||||
&& options.highlightsRE.exec(data.msg.text)) {
|
||||
data.msg.highlight = true;
|
||||
}
|
||||
|
||||
channel.messages.push(data.msg);
|
||||
|
||||
if (data.msg.self) {
|
||||
|
|
Loading…
Reference in a new issue