2019-11-29 12:59:40 +01:00
|
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
|
|
|
// See LICENSE.txt for license information.
|
2018-12-05 10:46:08 -08:00
|
|
|
|
|
|
|
|
package app
|
|
|
|
|
|
2019-11-28 14:39:38 +01:00
|
|
|
import "github.com/mattermost/mattermost-server/v5/plugin"
|
2018-12-05 10:46:08 -08:00
|
|
|
|
|
|
|
|
func (a *App) PluginContext() *plugin.Context {
|
|
|
|
|
context := &plugin.Context{
|
2020-02-13 13:26:58 +01:00
|
|
|
RequestId: a.RequestId(),
|
|
|
|
|
SessionId: a.Session().Id,
|
|
|
|
|
IpAddress: a.IpAddress(),
|
|
|
|
|
AcceptLanguage: a.AcceptLanguage(),
|
|
|
|
|
UserAgent: a.UserAgent(),
|
2018-12-05 10:46:08 -08:00
|
|
|
}
|
|
|
|
|
return context
|
|
|
|
|
}
|