sendEachForMulticast method
Sends the given multicast message to all the FCM registration tokens specified in it.
This method uses the {@link Messaging.sendEach} API under the hood to send the given
message to all the target recipients. The responses list obtained from the
return value corresponds to the order of tokens in the MulticastMessage
.
An error from this method or a BatchResponse
with all failures indicates a total
failure, meaning that the messages in the list could be sent. Partial failures or
failures are only indicated by a BatchResponse
return value.
@param message - A multicast message containing up to 500 tokens. @param dryRun - Whether to send the message in the dry-run (validation only) mode. @returns A Promise fulfilled with an object representing the result of the send operation.
Implementation
external JSPromise<BatchResponse> sendEachForMulticast(
MulticastMessage message, [
bool dryRun,
]);