summaryrefslogtreecommitdiffstats
path: root/api/import.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-20 10:04:17 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-20 10:04:17 -0600
commit11c035aef45fbc6dfbc360123611108a199eca79 (patch)
treee0edabe17ad251a029214ed98a9f7ea66d880a91 /api/import.go
parent640d3018c9a75e7c85da55c3483396e31a6de994 (diff)
downloadchat-11c035aef45fbc6dfbc360123611108a199eca79.tar.gz
chat-11c035aef45fbc6dfbc360123611108a199eca79.tar.bz2
chat-11c035aef45fbc6dfbc360123611108a199eca79.zip
PLT-7 adding loc db calls for oauth table
Diffstat (limited to 'api/import.go')
-rw-r--r--api/import.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/api/import.go b/api/import.go
index 5c8f99348..7c4770327 100644
--- a/api/import.go
+++ b/api/import.go
@@ -6,6 +6,7 @@ package api
import (
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
+ goi18n "github.com/nicksnyder/go-i18n/i18n"
)
//
@@ -21,7 +22,7 @@ func ImportPost(post *model.Post) {
}
}
-func ImportUser(user *model.User) *model.User {
+func ImportUser(T goi18n.TranslateFunc, user *model.User) *model.User {
user.MakeNonNil()
if result := <-Srv.Store.User().Save(user); result.Err != nil {
@@ -30,7 +31,7 @@ func ImportUser(user *model.User) *model.User {
} else {
ruser := result.Data.(*model.User)
- if err := JoinDefaultChannels(ruser, ""); err != nil {
+ if err := JoinDefaultChannels(T, ruser, ""); err != nil {
l4g.Error("Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v", ruser.Id, ruser.TeamId, err)
}
@@ -42,8 +43,8 @@ func ImportUser(user *model.User) *model.User {
}
}
-func ImportChannel(channel *model.Channel) *model.Channel {
- if result := <-Srv.Store.Channel().Save(channel); result.Err != nil {
+func ImportChannel(T goi18n.TranslateFunc, channel *model.Channel) *model.Channel {
+ if result := <-Srv.Store.Channel().Save(T, channel); result.Err != nil {
return nil
} else {
sc := result.Data.(*model.Channel)