play sound when a chat is directed at a user and oochat is not focused
bkad opened this issue · comments
Kevin Le commented
A chat is considered to be directed towards a person when a message includes @username
where username
is the everything before the @
in the user's email address.
Kevin Le commented
this fucks up when alice@foo.com
and alice@bar.com
are logged into the same channel, but that's going to pretty rare for our use case.
Kevin Le commented
use:
document.hasFocus() && !document.webkitHidden