summaryrefslogtreecommitdiffstats
path: root/web/react/components/channel_notifications.jsx
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-09-30 12:28:28 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-10-01 08:31:17 -0400
commitc9a0030551f289241407743fbd21080cd8a358a4 (patch)
tree03019a8ad970ebd66d7f5bd1a84d11fcdb76f1ff /web/react/components/channel_notifications.jsx
parentc16b9de8dc4924cf2fb243579284e67f55cf3a47 (diff)
downloadchat-c9a0030551f289241407743fbd21080cd8a358a4.tar.gz
chat-c9a0030551f289241407743fbd21080cd8a358a4.tar.bz2
chat-c9a0030551f289241407743fbd21080cd8a358a4.zip
Moved ChannelMember.NotifyLevel into ChannelMember.NotifyProps
Diffstat (limited to 'web/react/components/channel_notifications.jsx')
-rw-r--r--web/react/components/channel_notifications.jsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/web/react/components/channel_notifications.jsx b/web/react/components/channel_notifications.jsx
index 55c0b5438..45981b295 100644
--- a/web/react/components/channel_notifications.jsx
+++ b/web/react/components/channel_notifications.jsx
@@ -41,7 +41,7 @@ export default class ChannelNotifications extends React.Component {
var channelId = button.getAttribute('data-channelid');
const member = ChannelStore.getMember(channelId);
- var notifyLevel = member.notify_level;
+ var notifyLevel = member.notify_props.desktop;
var markUnreadLevel = member.notify_props.mark_unread;
this.setState({
@@ -62,7 +62,7 @@ export default class ChannelNotifications extends React.Component {
}
const member = ChannelStore.getMember(this.state.channelId);
- var notifyLevel = member.notify_level;
+ var notifyLevel = member.notify_props.desktop;
var markUnreadLevel = member.notify_props.mark_unread;
var newState = this.state;
@@ -81,7 +81,7 @@ export default class ChannelNotifications extends React.Component {
var channelId = this.state.channelId;
var notifyLevel = this.state.notifyLevel;
- if (ChannelStore.getMember(channelId).notify_level === notifyLevel) {
+ if (ChannelStore.getMember(channelId).notify_props.desktop === notifyLevel) {
this.updateSection('');
return;
}
@@ -89,16 +89,12 @@ export default class ChannelNotifications extends React.Component {
var data = {};
data.channel_id = channelId;
data.user_id = UserStore.getCurrentId();
- data.notify_level = notifyLevel;
+ data.desktop = notifyLevel;
- if (!data.notify_level || data.notify_level.length === 0) {
- return;
- }
-
- Client.updateNotifyLevel(data,
+ Client.updateNotifyProps(data,
() => {
var member = ChannelStore.getMember(channelId);
- member.notify_level = notifyLevel;
+ member.notify_props.desktop = notifyLevel;
ChannelStore.setChannelMember(member);
this.updateSection('');
},