-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure self messages are never highlighted #157
Conversation
I was thinking about this yesterday and didn't get around to making an issue for it, and here's a PR all set to fix it. 👍 |
This is a quick fix, but maybe a wee bit longer-term solution should be to parse and trigger on the client instead, like #152 is doing, no? |
Wouldn't it be better to check for self before the loop and avoid splitting the message entirely instead of doing it and overriding it right after? Also, my PR doesn't actually touch that. This function is only responsible of turning IRC messages into HTML. If we want to handle highlights on the client, it would fit more in the msg handler. One minor thing for client-side highlights: if the user changes nicks and reload the page, the previous highlights will no longer be highlighted. Storing it in the server object has the benefit of making it permanent. |
@maxpoulin64 is right, check for |
Does this remove the need for #146 ? I actually think it's a much nicer way of doing it, rather than hacking in the client as to which highlight messages we actually show. |
Hm, looks like yes, it does. |
Yeah, that's fine. I think it's better dealing with it this way, especially for this issue. |
Good point guys, I'll fix that. |
6089cd6
to
855f7ce
Compare
855f7ce
to
6a6c417
Compare
Hi all, took your comments into consideration to make things nicer. Thanks for looking carefully and sorry for being reckless in the first place :p |
👍 looks all good to me |
Make sure self messages are never highlighted
Fixes #156.