Add anon-metrics case (#2206)

This commit is contained in:
Shivek Khurana 2021-04-19 10:57:18 +05:30 committed by GitHub
parent c739f73f49
commit da1259ae8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -376,6 +376,12 @@ func (db *Database) SaveSetting(setting string, value interface{}) error {
return ErrInvalidConfig
}
update, err = db.db.Prepare("UPDATE settings SET webview_allow_permission_requests = ? WHERE synthetic_id = 'id'")
case "anon-metrics/should-send?":
_, ok := value.(bool)
if !ok {
return ErrInvalidConfig
}
update, err = db.db.Prepare("UPDATE settings SET anon_metrics_should_send = ? WHERE synthetic_id = 'id'")
default:
return ErrInvalidConfig
}