diff --git a/internal/bridge/bridge.go b/internal/bridge/bridge.go index fe29ca4d..6dc034ab 100644 --- a/internal/bridge/bridge.go +++ b/internal/bridge/bridge.go @@ -340,13 +340,8 @@ func getAPIUser(client pmapi.Client, auth *pmapi.Auth, mbPassword string) (user return } - if _, err = client.Unlock(hashedPassword); err != nil { - log.WithError(err).Error("Could not decrypt keyring") - return - } - if user, err = client.UpdateUser(); err != nil { - log.WithError(err).Error("Could not update API user") + log.WithError(err).Error("Could not load API user") return } @@ -439,7 +434,7 @@ func (b *Bridge) DeleteUser(userID string, clearStore bool) error { // ReportBug reports a new bug from the user. func (b *Bridge) ReportBug(osType, osVersion, description, accountName, address, emailClient string) error { - c := b.clientManager.GetClient("bug_reporter") + c := b.clientManager.GetAnonymousClient() defer c.Logout() title := "[Bridge] Bug" @@ -463,7 +458,7 @@ func (b *Bridge) ReportBug(osType, osVersion, description, accountName, address, // SendMetric sends a metric. We don't want to return any errors, only log them. func (b *Bridge) SendMetric(m metrics.Metric) { - c := b.clientManager.GetClient("metric_reporter") + c := b.clientManager.GetAnonymousClient() defer c.Logout() cat, act, lab := m.Get() diff --git a/pkg/config/logs.go b/pkg/config/logs.go index 4e8870cd..9aa38e9e 100644 --- a/pkg/config/logs.go +++ b/pkg/config/logs.go @@ -65,7 +65,7 @@ func GetLogEntry(packageName string) *logrus.Entry { func HandlePanic(cfg *Config, output string) { if !cfg.IsDevMode() { // TODO: Is it okay to just create a throwaway client like this? - c := pmapi.NewClientManager(cfg.GetAPIConfig()).GetClient("no-user-id") + c := pmapi.NewClientManager(cfg.GetAPIConfig()).GetAnonymousClient() defer c.Logout() if err := c.ReportSentryCrash(fmt.Errorf(output)); err != nil {