My code:
const payload: admin.messaging.Message = {
notification,
android: {
ttl: 3600 * 1000,
notification: {
icon: 'https://firebasestorage.googleapis.com/v0/b/easychurchmobile.appspot.com/o/easychurch%2Flogo_plena.png?alt=media&token=aa67fd68-1325-4b8d-b692-085a211b397d',
color: '#f45342',
sound: 'default',
clickAction: nota.href
},
},
apns: {
payload: {
aps: {
mutableContent: true,
alert: {
title: '$GOOG up 1.43% on the day',
body: '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
launchImage: 'https://firebasestorage.googleapis.com/v0/b/easychurchmobile.appspot.com/o/easychurch%2Flogo_plena.png?alt=media&token=aa67fd68-1325-4b8d-b692-085a211b397d',
actionLocKey: nota.href
},
contentAvailable: true,
sound: 'default',
badge: 0,
},
},
},
webpush: {
notification: {
title: '$GOOG up 1.43% on the day',
body: '$GOOG gained 11.80 points to close at 835.67, up 1.43% on the day.',
icon: 'https://firebasestorage.googleapis.com/v0/b/easychurchmobile.appspot.com/o/easychurch%2Flogo_plena.png?alt=media&token=aa67fd68-1325-4b8d-b692-085a211b397d'
}
},
topic: nota.params.topico
};
console.log('Nota', nota);
console.log('Payload', payload);
return admin.messaging().send(payload);