Commit b30657c5 authored by avocatier tac's avatar avocatier tac
Browse files

Fix: starting a new Period with a Static QR Code

parent 77684aeb
Pipeline #238032 passed with stages
in 10 minutes and 32 seconds
......@@ -64,7 +64,9 @@ public class Location {
* @throws CleaEncryptionException
*/
public String newDeepLink(Instant periodStartTime, Instant qrCodeValidityStartTime) throws CleaCryptoException {
this.setPeriodStartTime(periodStartTime);
if(!this.locationSpecificPart.getPeriodStartTime().equals(periodStartTime)){
this.setPeriodStartTime(periodStartTime);
}
this.setQrCodeValidityStartTime(periodStartTime, qrCodeValidityStartTime);
return COUNTRY_SPECIFIC_PREFIX + this.getLocationSpecificPartEncryptedBase64();
}
......@@ -95,6 +97,7 @@ public class Location {
this.locationSpecificPart.setPeriodStartTime(periodStartTime);
this.locationSpecificPart.setLocationTemporarySecretKey(locationTemporarySecretKey);
this.locationSpecificPart.setLocationTemporaryPublicId(currentLocationTemporaryPublicId);
this.locationSpecificPart.setQrCodeValidityStartTime(null);
if (Objects.nonNull(this.contact)) {
this.contact.setPeriodStartTime(periodStartTime);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment