Merge pull request #944 from appwrite/fix-d-is-null

fix: d is null
This commit is contained in:
Torsten Dittmann
2024-03-09 18:34:50 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
@@ -49,8 +49,8 @@
break;
case MessagingProviderType.Push:
{
const file = $messageParams[MessagingProviderType.Push].file;
const fileCompoundId = `${file.bucketId}:${file.$id}`;
const file = $messageParams[MessagingProviderType.Push]?.file;
const fileCompoundId = file ? `${file.bucketId}:${file.$id}` : undefined;
const customData: Record<string, string> = {};
const { data } = $messageParams[MessagingProviderType.Push];
if (data && data.length > 0) {
@@ -23,8 +23,8 @@ export type SMSMessageParams = MessageParams & {
export type PushMessageParams = MessageParams & {
title: string;
body: string;
file: Models.File;
data: [string, string][];
file: Models.File;
action?: string;
icon?: string;
sound?: string;