Skip to content

Commit

Permalink
Merge c3b56e0 into ca4181b
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilander committed Mar 3, 2017
2 parents ca4181b + c3b56e0 commit b06a981
Show file tree
Hide file tree
Showing 26 changed files with 809 additions and 712 deletions.
434 changes: 100 additions & 334 deletions api/command.go

Large diffs are not rendered by default.

87 changes: 0 additions & 87 deletions api/command_expand_collapse.go

This file was deleted.

57 changes: 0 additions & 57 deletions api/command_join.go

This file was deleted.

95 changes: 0 additions & 95 deletions api/command_msg.go

This file was deleted.

2 changes: 1 addition & 1 deletion api/auto_channels.go → app/auto_channels.go
@@ -1,7 +1,7 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package api
package app

import (
"github.com/mattermost/platform/model"
Expand Down
2 changes: 1 addition & 1 deletion api/auto_constants.go → app/auto_constants.go
@@ -1,7 +1,7 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package api
package app

import (
"github.com/mattermost/platform/model"
Expand Down
2 changes: 1 addition & 1 deletion api/auto_environment.go → app/auto_environment.go
@@ -1,7 +1,7 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package api
package app

import (
"github.com/mattermost/platform/model"
Expand Down
2 changes: 1 addition & 1 deletion api/auto_posts.go → app/auto_posts.go
@@ -1,7 +1,7 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package api
package app

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion api/auto_teams.go → app/auto_teams.go
@@ -1,7 +1,7 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package api
package app

import (
"github.com/mattermost/platform/model"
Expand Down
11 changes: 5 additions & 6 deletions api/auto_users.go → app/auto_users.go
@@ -1,10 +1,9 @@
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

package api
package app

import (
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/store"
"github.com/mattermost/platform/utils"
Expand Down Expand Up @@ -50,8 +49,8 @@ func CreateBasicUser(client *model.Client) *model.AppError {
return err
}
ruser := result.Data.(*model.User)
store.Must(app.Srv.Store.User().VerifyEmail(ruser.Id))
store.Must(app.Srv.Store.Team().SaveMember(&model.TeamMember{TeamId: basicteam.Id, UserId: ruser.Id}))
store.Must(Srv.Store.User().VerifyEmail(ruser.Id))
store.Must(Srv.Store.Team().SaveMember(&model.TeamMember{TeamId: basicteam.Id, UserId: ruser.Id}))
}
return nil
}
Expand Down Expand Up @@ -82,14 +81,14 @@ func (cfg *AutoUserCreator) createRandomUser() (*model.User, bool) {
ruser := result.Data.(*model.User)

status := &model.Status{UserId: ruser.Id, Status: model.STATUS_ONLINE, Manual: false, LastActivityAt: model.GetMillis(), ActiveChannel: ""}
if result := <-app.Srv.Store.Status().SaveOrUpdate(status); result.Err != nil {
if result := <-Srv.Store.Status().SaveOrUpdate(status); result.Err != nil {
result.Err.Translate(utils.T)
l4g.Error(result.Err.Error())
return nil, false
}

// We need to cheat to verify the user's email
store.Must(app.Srv.Store.User().VerifyEmail(ruser.Id))
store.Must(Srv.Store.User().VerifyEmail(ruser.Id))

return result.Data.(*model.User), true
}
Expand Down

0 comments on commit b06a981

Please sign in to comment.