summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-11-06 12:55:05 -0500
committerJoramWilander <jwawilander@gmail.com>2015-11-06 12:55:05 -0500
commit6a2ef68444934944ce39b4bd1a6c0a571809bcf7 (patch)
tree0a35521b678d5e0f666192b6353aa085a74cd95f /api
parent190adae0c9e36912930663429d185b94cfbef1bd (diff)
downloadchat-6a2ef68444934944ce39b4bd1a6c0a571809bcf7.tar.gz
chat-6a2ef68444934944ce39b4bd1a6c0a571809bcf7.tar.bz2
chat-6a2ef68444934944ce39b4bd1a6c0a571809bcf7.zip
Add tutorial pref for new users by default
Diffstat (limited to 'api')
-rw-r--r--api/user.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/api/user.go b/api/user.go
index 774ceddbf..4a52cf88b 100644
--- a/api/user.go
+++ b/api/user.go
@@ -213,6 +213,11 @@ func CreateUser(c *Context, team *model.Team, user *model.User) *model.User {
}
}
+ pref := model.Preference{UserId: ruser.Id, Category: model.PREFERENCE_CATEGORY_TUTORIAL_STEPS, Name: ruser.Id, Value: "0"}
+ if presult := <-Srv.Store.Preference().Save(&model.Preferences{pref}); presult.Err != nil {
+ l4g.Error("Encountered error saving tutorial preference, err=%v", presult.Err.Message)
+ }
+
ruser.Sanitize(map[string]bool{})
// This message goes to every channel, so the channelId is irrelevant