1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-12-25 14:25:35 +00:00

Fixed a bug in Utils.anonymize

This commit is contained in:
Fabian Schlenz 2018-04-10 06:13:29 +02:00
parent 5c466131d3
commit be1cf8ba91

View File

@ -195,7 +195,7 @@ object Utils {
}
fun String.anonymize(): String {
return if (Utils.anonymize) this else this.replace(Regex("[0-9]"), "1").replace(Regex("[A-Z]"), "A").replace(Regex("[a-z]"), "a") + " (ANONYMIZED)"
return if (!Utils.anonymize) this else this.replace(Regex("[0-9]"), "1").replace(Regex("[A-Z]"), "A").replace(Regex("[a-z]"), "a") + " (ANONYMIZED)"
}
fun Any.toJson(): String = Gson().toJson(this)