getMessaging method
Gets the {@link Messaging} service for the default app or a given app.
admin.messaging()
can be called with no arguments to access the default
app's Messaging
service or as admin.messaging(app)
to access the
Messaging
service associated with aspecific app.
@example
// Get the Messaging service for the default app
const defaultMessaging = getMessaging();
@example
// Get the Messaging service for a given app
const otherMessaging = getMessaging(otherApp);
@param app - Optional app whose Messaging
service to
return. If not provided, the default Messaging
service will be returned.
@returns The default Messaging
service if no
app is provided or the Messaging
service associated with the provided
app.
Implementation
external Messaging getMessaging([JSObject? app]);