github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/app/plugin_context.go (about) 1 // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. 2 // See LICENSE.txt for license information. 3 4 package app 5 6 import ( 7 "github.com/mattermost/mattermost-server/v5/plugin" 8 ) 9 10 func (a *App) PluginContext() *plugin.Context { 11 context := &plugin.Context{ 12 RequestId: a.RequestId(), 13 SessionId: a.Session().Id, 14 IpAddress: a.IpAddress(), 15 AcceptLanguage: a.AcceptLanguage(), 16 UserAgent: a.UserAgent(), 17 } 18 return context 19 }