in source/functions/gameupdates-notifications-function/index.js [85:96]
async function handleGameModify(unmarshalledNewImage,unmarshalledOldImage, eventID) {
if(unmarshalledNewImage.gameStatus != null && unmarshalledNewImage.gameStatus.status === 'STARTED' && (unmarshalledOldImage.gameStatus == null || unmarshalledNewImage.gameStatus.status !== unmarshalledOldImage.gameStatus.status )) {
return await createGameStartedCampaign(unmarshalledNewImage, eventID);
}
if(unmarshalledNewImage.gameStatus.status !== 'STARTED' && (unmarshalledOldImage.gameStatus == null || unmarshalledNewImage.gameStatus.status !== unmarshalledOldImage.gameStatus.status)) {
return await createGameStatusChangedCampaign(unmarshalledNewImage, eventID);
}
if((unmarshalledNewImage.gameStatus != null && unmarshalledOldImage.gameStatus != null) && (unmarshalledNewImage.gameStatus.awayScore !== unmarshalledOldImage.gameStatus.awayScore || unmarshalledNewImage.gameStatus.homeScore !== unmarshalledOldImage.gameStatus.homeScore)) {
return await createGameScoreChangedCampaign(unmarshalledNewImage, eventID);
}
return null;
}