mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 14:36:53 +00:00
don't make empty transactions
This commit is contained in:
1 parent
b0818148cf
commit
d47ff9b7c7
2 files changed
+7
No files matched your search
+4
@@ -88,6 +88,10 @@ public abstract class RepeatedUseSignedPreKeyStore<K extends SignedPreKey<?>> {
|
||||
* @return a future that completes once all keys have been stored
|
||||
*/
|
||||
public CompletableFuture<Void> store(final UUID identifier, final Map<Byte, K> signedPreKeysByDeviceId) {
|
||||
if (signedPreKeysByDeviceId.isEmpty()) {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
}
|
||||
|
||||
final Timer.Sample sample = Timer.start();
|
||||
|
||||
return dynamoDbAsyncClient.transactWriteItems(TransactWriteItemsRequest.builder()
|
||||
|
||||
Reference in new issue
Block a user