From fa49244b4b9ea481af6f61d8dfeeefdcd6e9c965 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 3 Dec 2024 22:50:40 +1300 Subject: [PATCH] Fix param type --- app/controllers/api/messaging.php | 2 +- src/Appwrite/Platform/Workers/Messaging.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/messaging.php b/app/controllers/api/messaging.php index 7116d31ba7..54b3eb83cb 100644 --- a/app/controllers/api/messaging.php +++ b/app/controllers/api/messaging.php @@ -2918,7 +2918,7 @@ App::post('/v1/messaging/messages/push') ->param('sound', '', new Text(256), 'Sound for push notification. Available only for Android and iOS Platform.', true) ->param('color', '', new Text(256), 'Color for push notification. Available only for Android Platform.', true) ->param('tag', '', new Text(256), 'Tag for push notification. Available only for Android Platform.', true) - ->param('badge', '', new Text(256), 'Badge for push notification. Available only for iOS Platform.', true) + ->param('badge', 0, new Integer(), 'Badge for push notification. Available only for iOS Platform.', true) ->param('contentAvailable', false, new Boolean(), 'Content available for push notification. Available only for iOS Platform.', true) ->param('draft', false, new Boolean(), 'Is message a draft', true) ->param('scheduledAt', null, new DatetimeValidator(requireDateInFuture: true), 'Scheduled delivery time for message in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.', true) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 5dee0fa72f..3edb0c2aed 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -333,7 +333,6 @@ class Messaging extends Action $message->setAttribute('status', MessageStatus::SENT); } - $message->removeAttribute('to'); foreach ($providers as $provider) {