Change parsing country codes, fixes #31

* Bump patch release version.
This commit is contained in:
Sven Seeberg 2022-07-13 13:16:31 +02:00
parent 8180caee78
commit 9c2f8bd4d0
Signed by: sven.seeberg
GPG key ID: 29559DD5A83806B5
2 changed files with 2 additions and 2 deletions

View file

@ -6,7 +6,7 @@
<groupId>netzbegruenung</groupId>
<artifactId>keycloak-2fa-sms-authenticator</artifactId>
<version>0.1.4</version>
<version>0.1.5</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View file

@ -136,7 +136,7 @@ public class ApiSmsService implements SmsService{
return phone_number;
}
if (phone_number.startsWith("00")) {
return phone_number.replaceFirst("00", countrycode);
return phone_number.replaceFirst("00", "+");
}
if (phone_number.startsWith("0")) {
return phone_number.replaceFirst("0", countrycode);