feat(GODT-3121): change log level of click on external link.

This commit is contained in:
Xavier Michelon
2023-12-01 18:02:29 +01:00
parent 120ddbbcbb
commit 3a66063938

View File

@ -219,13 +219,15 @@ func (user *User) ExternalLinkClicked(article string) {
"https://proton.me/support/why-you-need-bridge", "https://proton.me/support/why-you-need-bridge",
} }
var reportToTelemetry bool
for id, url := range trackedLinks { for id, url := range trackedLinks {
if url == article { if url == article {
if err := user.configStatus.RecordLinkClicked(uint(id)); err != nil { if err := user.configStatus.RecordLinkClicked(uint(id)); err != nil {
user.log.WithError(err).Error("Failed to log LinkClicked in config_status.") user.log.WithError(err).Error("Failed to log LinkClicked in config_status.")
} }
return reportToTelemetry = true
break
} }
} }
user.log.WithField("article", article).Error("Failed to find KB article id.") user.log.WithField("report", reportToTelemetry).WithField("article", article).Debug("External link was clicked.")
} }