mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Fix notifications for users whose username is their first or last name
(imported from commit 66a58e81571f4eed3c840950bde63ef245ca4d48)
This commit is contained in:
@@ -16,7 +16,14 @@ function browser_desktop_notifications_on () {
|
|||||||
|
|
||||||
exports.initialize = function () {
|
exports.initialize = function () {
|
||||||
names = fullname.split(" ");
|
names = fullname.split(" ");
|
||||||
names.push(email.split("@")[0]);
|
var username = email.split("@")[0];
|
||||||
|
// If the username is part of the user's full name, then don't add it
|
||||||
|
// to names because we don't send notifications to ambiguous names
|
||||||
|
// that could refer to multiple people in the domain.
|
||||||
|
// (We later add to names all of the names from the domain)
|
||||||
|
if (names.indexOf(username) === -1) {
|
||||||
|
names.push(username);
|
||||||
|
}
|
||||||
|
|
||||||
$(window).focus(function () {
|
$(window).focus(function () {
|
||||||
window_has_focus = true;
|
window_has_focus = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user