MM-10703 Adding blank request context to plugin hooks for future use. (#9043)
* Adding blank request context to plugin hooks for future use. * Rename RequestContext to Context * Adding context to ServeHTTP and ExecuteCommand * Fixing import cycle in test.
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
7bfb5aec26
Коммит
4c1ddcff10
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/app"
|
||||
"github.com/mattermost/mattermost-server/mlog"
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/plugin"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
@@ -526,3 +527,11 @@ func (c *Context) RequireRoleName() *Context {
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
func (c *Context) ToPluginContext() *plugin.Context {
|
||||
return &plugin.Context{
|
||||
//sessionId: c.Session.Id,
|
||||
//requestId: c.RequestId,
|
||||
//userIp: c.IpAddress,
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user