Skip to content

Commit

Permalink
Update how to fetch diagnostic id to avoid panics (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
larkox authored Sep 9, 2020
1 parent b952d3c commit 62dad6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ func (p *Plugin) OnConfigurationChange() (err error) {

e.Dependencies.Logger = e.bot

e.Dependencies.Tracker = mscalendarTracker.New(telemetry.NewTracker(p.telemetryClient, p.API.GetDiagnosticId(), p.API.GetServerVersion(), e.PluginID, e.PluginVersion, config.TelemetryShortName, *p.API.GetConfig().LogSettings.EnableDiagnostics, e.Logger))
diagnostics := false
if p.API.GetConfig() != nil && p.API.GetConfig().LogSettings.EnableDiagnostics != nil {
diagnostics = *p.API.GetConfig().LogSettings.EnableDiagnostics
}
e.Dependencies.Tracker = mscalendarTracker.New(telemetry.NewTracker(p.telemetryClient, p.API.GetDiagnosticId(), p.API.GetServerVersion(), e.PluginID, e.PluginVersion, config.TelemetryShortName, diagnostics, e.Logger))

e.Dependencies.Poster = e.bot
e.Dependencies.Welcomer = mscalendarBot
Expand Down

0 comments on commit 62dad6e

Please sign in to comment.