mirror of
https://github.com/thelounge/thelounge
synced 2025-02-16 21:28:23 +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);
|
channel.messages.push(data.msg);
|
||||||
|
|
||||||
if (data.msg.self) {
|
if (data.msg.self) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue