Rank 1: Thread
Hello,
I can't use the messaging.createPush function in a node.js server function.
If I use null for the optional parameters as shown below:
message = await messaging.createPush( ID.unique(), // messageId title, // title body, // body [], // topics (optional) users || [], // users (optional) targets || [], // targets data || {}, // data null, // action (optional) null, // image (optional) null, // icon (optional) sound, // sound (optional) null, // color (optional) null, // tag (optional) null, // badge (optional) false, // draft (optional) null // scheduledAt (optional));I get the following error in the Appwrite container log:
2024-06-19 01:44:29 [Error] Method: POST
2024-06-19 01:44:29 [Error] URL: /v1/messaging/messages/push
2024-06-19 01:44:29 [Error] Type: TypeError
2024-06-19 01:44:29 [Error] Message: {closure}(): Argument #8 ($action) must be of type string, null given, called in /usr/src/code/vendor/utopia-php/framework/src/App.php on line 531
2024-06-19 01:44:29 [Error] File: /usr/src/code/app/controllers/api/messaging.php
2024-06-19 01:44:29 [Error] Line: 2876