PLT-4938 Add app package and move logic over from api package (#4931)

* Add app package and move logic over from api package

* Change app package functions to return errors

* Move non-api tests into app package

* Fix merge
This commit is contained in:
Joram Wilander
2017-01-13 13:53:37 -05:00
committed by GitHub
parent 07bad4d6d5
commit 97558f6a6e
85 changed files with 3368 additions and 2997 deletions

View File

@@ -4,6 +4,7 @@
package api
import (
"github.com/mattermost/platform/app"
"github.com/mattermost/platform/model"
)
@@ -36,7 +37,7 @@ func (me *OnlineProvider) DoCommand(c *Context, args *model.CommandArgs, message
if len(message) > 0 {
rmsg = message + " " + rmsg
}
SetStatusOnline(c.Session.UserId, c.Session.Id, true)
app.SetStatusOnline(c.Session.UserId, c.Session.Id, true)
return &model.CommandResponse{ResponseType: model.COMMAND_RESPONSE_TYPE_EPHEMERAL, Text: rmsg}
}