Implement the message send log for sender key retries.

This commit is contained in:
Greyson Parrelli
2021-06-24 11:22:20 -04:00
committed by Cody Henthorne
parent 6502ef64ce
commit f19033a7a2
31 changed files with 1077 additions and 179 deletions

View File

@@ -68,8 +68,8 @@ public class Data {
}
public byte[] getStringAsBlob(@NonNull String key) {
throwIfAbsent(strings, key);
return Base64.decodeOrThrow(strings.get(key));
String raw = getString(key);
return raw != null ? Base64.decodeOrThrow(raw) : null;
}
public String getStringOrDefault(@NonNull String key, String defaultValue) {
@@ -356,8 +356,8 @@ public class Data {
return this;
}
public Builder putBlobAsString(@NonNull String key, @NonNull byte[] value) {
String serialized = Base64.encodeBytes(value);
public Builder putBlobAsString(@NonNull String key, @Nullable byte[] value) {
String serialized = value != null ? Base64.encodeBytes(value) : null;
strings.put(key, serialized);
return this;
}