firebase-admin-java
firebase-admin-java copied to clipboard
Fixed an error message when sending more than 500 pieces
I need a fix for the error message that shows when over 500 messages occur. Currently, the message is showing as 500 inclusive, which should be changed to excess.
private CallableOperation<BatchResponse, FirebaseMessagingException> sendAllOp(
final List<Message> messages, final boolean dryRun) {
final List<Message> immutableMessages = ImmutableList.copyOf(messages);
checkArgument(!immutableMessages.isEmpty(), "messages list must not be empty");
checkArgument(immutableMessages.size() <= 500,
"messages list must not contain more than 500 elements");
final FirebaseMessagingClient messagingClient = getMessagingClient();
return new CallableOperation<BatchResponse,FirebaseMessagingException>() {
@Override
protected BatchResponse execute() throws FirebaseMessagingException {
return messagingClient.sendAll(messages, dryRun);
}
};
}
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.