Detect highlights

This commit is contained in:
Simon Ser 2020-06-29 11:08:47 +02:00
parent ed6dccbb58
commit abece1e3fd
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 55 additions and 1 deletions

View file

@ -168,7 +168,12 @@ export default class App extends Component {
var msgUnread = Unread.NONE;
if (msg.command == "PRIVMSG" || msg.command == "NOTICE") {
msgUnread = Unread.MESSAGE;
var text = msg.params[1];
if (msg.prefix.name != this.client.nick && irc.isHighlight(text, this.client.nick)) {
msgUnread = Unread.HIGHLIGHT;
} else {
msgUnread = Unread.MESSAGE;
}
}
if (msg.prefix.name != this.client.nick && msg.command != "PART") {