mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 12:46:53 +00:00
Handle expected case of empty flux in message deletion
This commit is contained in:
1 parent
c10fda8363
commit
aa829af43b
2 files changed
+15
-4
No files matched your search
+3
-3
@@ -175,9 +175,9 @@ public class MessagesDynamoDb extends AbstractDynamoDbStore {
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.last()
|
||||
.toFuture()
|
||||
.thenApply(Optional::ofNullable);
|
||||
.map(Optional::ofNullable)
|
||||
.last(Optional.empty()) // if the flux is empty, last() will throw without a default
|
||||
.toFuture();
|
||||
}
|
||||
|
||||
public CompletableFuture<Optional<MessageProtos.Envelope>> deleteMessage(final UUID destinationAccountUuid,
|
||||
|
||||
Reference in new issue
Block a user