mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
feat(GODT-2555): add local telemetry settings.
feat(GODT-2555): add 'TelemetryDisabled' settings to vault. feat(GODT-2555): CLI and GUI implementation. feat(GODT-2555): implemented setting in bridge-gui-tester. feat(GODT-2555): added unit tests. feat(GODT-2555): feature tests.
This commit is contained in:
@ -214,6 +214,23 @@ func (s *Service) IsAllMailVisible(ctx context.Context, _ *emptypb.Empty) (*wrap
|
||||
return wrapperspb.Bool(s.bridge.GetShowAllMail()), nil
|
||||
}
|
||||
|
||||
func (s *Service) SetIsTelemetryDisabled(_ context.Context, isDisabled *wrapperspb.BoolValue) (*emptypb.Empty, error) {
|
||||
s.log.WithField("isEnabled", isDisabled.Value).Debug("SetIsTelemetryDisabled")
|
||||
|
||||
if err := s.bridge.SetTelemetryDisabled(isDisabled.Value); err != nil {
|
||||
s.log.WithError(err).Error("Failed to set telemetry status")
|
||||
return nil, status.Errorf(codes.Internal, "failed to set telemetry status: %v", err)
|
||||
}
|
||||
|
||||
return &emptypb.Empty{}, nil
|
||||
}
|
||||
|
||||
func (s *Service) IsTelemetryDisabled(_ context.Context, _ *emptypb.Empty) (*wrapperspb.BoolValue, error) {
|
||||
s.log.Debug("IsTelemetryDisabled")
|
||||
|
||||
return wrapperspb.Bool(s.bridge.GetTelemetryDisabled()), nil
|
||||
}
|
||||
|
||||
func (s *Service) GoOs(ctx context.Context, _ *emptypb.Empty) (*wrapperspb.StringValue, error) {
|
||||
s.log.Debug("GoOs") // TO-DO We can probably get rid of this and use QSysInfo::product name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user