diff --git a/server/.golangci.yml b/server/.golangci.yml index 2ad6382b3b..afe6f8cfd0 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -158,7 +158,6 @@ issues: channels/store/storetest/thread_store.go|\ channels/store/storetest/user_store.go|\ channels/web/oauth_test.go|\ - channels/web/saml.go|\ channels/web/web_test.go|\ cmd/mattermost/commands/cmdtestlib.go|\ cmd/mattermost/commands/db.go|\ diff --git a/server/channels/web/saml.go b/server/channels/web/saml.go index 85af1fb49d..8b2594e25c 100644 --- a/server/channels/web/saml.go +++ b/server/channels/web/saml.go @@ -155,7 +155,9 @@ func completeSaml(c *Context, w http.ResponseWriter, r *http.Request) { c.LogErrorByCode(err) break } - c.App.AddDirectChannels(c.AppContext, teamId, user) + if err = c.App.AddDirectChannels(c.AppContext, teamId, user); err != nil { + c.LogErrorByCode(err) + } } case model.OAuthActionEmailToSSO: if err = c.App.RevokeAllSessions(c.AppContext, user.Id); err != nil {