summaryrefslogtreecommitdiffstats
path: root/model/channel_member.go
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-09-22 12:00:34 -0400
committerhmhealey <harrisonmhealey@gmail.com>2015-09-30 09:59:58 -0400
commit4bc625e8d10ab7735b76814fe9bbf3fb9144d4e1 (patch)
tree3ecdfa0f4aaa11ba0338657c95000140cc0e05b8 /model/channel_member.go
parent8a5ab6a56fcf428bded859c2325d7ef998fa116b (diff)
downloadchat-4bc625e8d10ab7735b76814fe9bbf3fb9144d4e1.tar.gz
chat-4bc625e8d10ab7735b76814fe9bbf3fb9144d4e1.tar.bz2
chat-4bc625e8d10ab7735b76814fe9bbf3fb9144d4e1.zip
Added 'default' option to channel notification settings that just uses the user's notification level
Diffstat (limited to 'model/channel_member.go')
-rw-r--r--model/channel_member.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/model/channel_member.go b/model/channel_member.go
index 50f51304b..ac0b94ec4 100644
--- a/model/channel_member.go
+++ b/model/channel_member.go
@@ -11,10 +11,11 @@ import (
const (
CHANNEL_ROLE_ADMIN = "admin"
+ CHANNEL_NOTIFY_DEFAULT = "default"
CHANNEL_NOTIFY_ALL = "all"
CHANNEL_NOTIFY_MENTION = "mention"
CHANNEL_NOTIFY_NONE = "none"
- CHANNEL_NOTIFY_QUIET = "quiet"
+ CHANNEL_NOTIFY_QUIET = "quiet" // TODO deprecate me
)
type ChannelMember struct {
@@ -76,5 +77,9 @@ func (o *ChannelMember) PreSave() {
}
func IsChannelNotifyLevelValid(notifyLevel string) bool {
- return notifyLevel == CHANNEL_NOTIFY_ALL || notifyLevel == CHANNEL_NOTIFY_MENTION || notifyLevel == CHANNEL_NOTIFY_NONE || notifyLevel == CHANNEL_NOTIFY_QUIET
+ return notifyLevel == CHANNEL_NOTIFY_DEFAULT ||
+ notifyLevel == CHANNEL_NOTIFY_ALL ||
+ notifyLevel == CHANNEL_NOTIFY_MENTION ||
+ notifyLevel == CHANNEL_NOTIFY_NONE ||
+ notifyLevel == CHANNEL_NOTIFY_QUIET
}