summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/post.go5
-rw-r--r--model/user.go2
2 files changed, 4 insertions, 3 deletions
diff --git a/model/post.go b/model/post.go
index d10a9f9fc..f6f33b1e8 100644
--- a/model/post.go
+++ b/model/post.go
@@ -9,7 +9,8 @@ import (
)
const (
- POST_DEFAULT = ""
+ POST_DEFAULT = ""
+ POST_JOIN_LEAVE = "join_leave"
)
type Post struct {
@@ -100,7 +101,7 @@ func (o *Post) IsValid() *AppError {
return NewAppError("Post.IsValid", "Invalid hashtags", "id="+o.Id)
}
- if !(o.Type == POST_DEFAULT) {
+ if !(o.Type == POST_DEFAULT || o.Type == POST_JOIN_LEAVE) {
return NewAppError("Post.IsValid", "Invalid type", "id="+o.Type)
}
diff --git a/model/user.go b/model/user.go
index c516fae78..b94ceb899 100644
--- a/model/user.go
+++ b/model/user.go
@@ -198,7 +198,7 @@ func (u *User) Sanitize(options map[string]bool) {
if len(options) != 0 && !options["phonenumber"] {
// TODO - fill in when PhoneNumber is added to user model
}
- if len(options) != 0 && !options["passwordupadte"] {
+ if len(options) != 0 && !options["passwordupdate"] {
u.LastPasswordUpdate = 0
}
}