summaryrefslogtreecommitdiffstats
path: root/model/channel_member.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-07-05 09:02:23 -0800
committer=Corey Hulen <corey@hulen.com>2015-07-05 09:02:23 -0800
commit592d68cf4134b668e3ff962d17f8aa75b1bc055f (patch)
tree6e743b07487caf5fe350439aefdf0355a7e80d9b /model/channel_member.go
parent72bfc1ee2afd2fa4a34186b62f144f8f6c50d693 (diff)
parent4a3003c0dcf7d642f233493e32b07beed5d08327 (diff)
downloadchat-592d68cf4134b668e3ff962d17f8aa75b1bc055f.tar.gz
chat-592d68cf4134b668e3ff962d17f8aa75b1bc055f.tar.bz2
chat-592d68cf4134b668e3ff962d17f8aa75b1bc055f.zip
Merge branch 'master' into mm-1391
Diffstat (limited to 'model/channel_member.go')
-rw-r--r--model/channel_member.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/model/channel_member.go b/model/channel_member.go
index 720ac4c42..50f51304b 100644
--- a/model/channel_member.go
+++ b/model/channel_member.go
@@ -25,6 +25,7 @@ type ChannelMember struct {
MsgCount int64 `json:"msg_count"`
MentionCount int64 `json:"mention_count"`
NotifyLevel string `json:"notify_level"`
+ LastUpdateAt int64 `json:"last_update_at"`
}
func (o *ChannelMember) ToJson() string {
@@ -70,6 +71,10 @@ func (o *ChannelMember) IsValid() *AppError {
return nil
}
+func (o *ChannelMember) PreSave() {
+ o.LastUpdateAt = GetMillis()
+}
+
func IsChannelNotifyLevelValid(notifyLevel string) bool {
return notifyLevel == CHANNEL_NOTIFY_ALL || notifyLevel == CHANNEL_NOTIFY_MENTION || notifyLevel == CHANNEL_NOTIFY_NONE || notifyLevel == CHANNEL_NOTIFY_QUIET
}