From ba0cbe723be7adcfa7b5a43e50b3932f8c7a929f Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 23 Nov 2015 12:14:50 -0800 Subject: Disabling the all mention --- api/post.go | 6 +++--- model/user.go | 2 +- web/react/components/channel_header.jsx | 6 +++--- web/react/components/mention_list.jsx | 12 ++++++------ .../components/user_settings/user_settings_notifications.jsx | 8 ++++---- web/react/utils/constants.jsx | 3 ++- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/api/post.go b/api/post.go index ca99eb15b..88d0127d3 100644 --- a/api/post.go +++ b/api/post.go @@ -407,9 +407,9 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team, } // Add @all to keywords if user has them turned on - if profile.NotifyProps["all"] == "true" { - keywordMap["@all"] = append(keywordMap["@all"], profile.Id) - } + // if profile.NotifyProps["all"] == "true" { + // keywordMap["@all"] = append(keywordMap["@all"], profile.Id) + // } // Add @channel to keywords if user has them turned on if profile.NotifyProps["channel"] == "true" { diff --git a/model/user.go b/model/user.go index 77dc04a03..694bafae9 100644 --- a/model/user.go +++ b/model/user.go @@ -177,7 +177,7 @@ func (u *User) SetDefaultNotifications() { u.NotifyProps["desktop_sound"] = "true" u.NotifyProps["mention_keys"] = u.Username + ",@" + u.Username u.NotifyProps["first_name"] = "false" - u.NotifyProps["all"] = "true" + u.NotifyProps["all"] = "all" u.NotifyProps["channel"] = "true" splitName := strings.Split(u.Nickname, " ") if len(splitName) > 0 && splitName[0] != "" { diff --git a/web/react/components/channel_header.jsx b/web/react/components/channel_header.jsx index 6e12c7c14..d31477881 100644 --- a/web/react/components/channel_header.jsx +++ b/web/react/components/channel_header.jsx @@ -101,9 +101,9 @@ export default class ChannelHeader extends React.Component { let terms = ''; if (user.notify_props && user.notify_props.mention_keys) { const termKeys = UserStore.getCurrentMentionKeys(); - if (user.notify_props.all === 'true' && termKeys.indexOf('@all') !== -1) { - termKeys.splice(termKeys.indexOf('@all'), 1); - } + // if (user.notify_props.all === 'true' && termKeys.indexOf('@all') !== -1) { + // termKeys.splice(termKeys.indexOf('@all'), 1); + // } if (user.notify_props.channel === 'true' && termKeys.indexOf('@channel') !== -1) { termKeys.splice(termKeys.indexOf('@channel'), 1); } diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx index d1b27cf99..297d5c719 100644 --- a/web/react/components/mention_list.jsx +++ b/web/react/components/mention_list.jsx @@ -183,12 +183,12 @@ export default class MentionList extends React.Component { } } - var all = {}; - all.username = 'all'; - all.nickname = ''; - all.secondary_text = 'Notifies everyone in the team'; - all.id = 'allmention'; - users.push(all); + // var all = {}; + // all.username = 'all'; + // all.nickname = ''; + // all.secondary_text = 'Notifies everyone in the team'; + // all.id = 'allmention'; + // users.push(all); var channel = {}; channel.username = 'channel'; diff --git a/web/react/components/user_settings/user_settings_notifications.jsx b/web/react/components/user_settings/user_settings_notifications.jsx index e36aed395..bba69a7d4 100644 --- a/web/react/components/user_settings/user_settings_notifications.jsx +++ b/web/react/components/user_settings/user_settings_notifications.jsx @@ -512,7 +512,7 @@ export default class NotificationsTab extends React.Component { }.bind(this); inputs.push(
-
+