mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 16:58:04 +01:00
Handle expected case of empty flux in message deletion
This commit is contained in:
@@ -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