This is an example of a cloud function that sets a message's status to delivered once the message is received on Firebase.
This function was created using a deprecated Node 8 environment on a free Firebase plan. Starting from March 15, 2021, you will need a paid plan to use Cloud Functions, so there might be a better way to do it. We will explore options to create more examples, including
read status and push notifications.