From 6685157f8a32971b1e1db8d963743a94c97d86f8 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 5 Jan 2023 11:54:01 -0500 Subject: [PATCH] Cast alert types to boolean in Api\Mastodon\Subscription --- src/Object/Api/Mastodon/Subscription.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Object/Api/Mastodon/Subscription.php b/src/Object/Api/Mastodon/Subscription.php index 993c73e61..8b0a84b0b 100644 --- a/src/Object/Api/Mastodon/Subscription.php +++ b/src/Object/Api/Mastodon/Subscription.php @@ -50,11 +50,11 @@ class Subscription extends BaseDataTransferObject $this->id = (string)$subscription['id']; $this->endpoint = $subscription['endpoint']; $this->alerts = [ - Notification::TYPE_FOLLOW => $subscription[Notification::TYPE_FOLLOW], - Notification::TYPE_LIKE => $subscription[Notification::TYPE_LIKE], - Notification::TYPE_RESHARE => $subscription[Notification::TYPE_RESHARE], - Notification::TYPE_MENTION => $subscription[Notification::TYPE_MENTION], - Notification::TYPE_POLL => $subscription[Notification::TYPE_POLL], + Notification::TYPE_FOLLOW => (bool)$subscription[Notification::TYPE_FOLLOW], + Notification::TYPE_LIKE => (bool)$subscription[Notification::TYPE_LIKE], + Notification::TYPE_RESHARE => (bool)$subscription[Notification::TYPE_RESHARE], + Notification::TYPE_MENTION => (bool)$subscription[Notification::TYPE_MENTION], + Notification::TYPE_POLL => (bool)$subscription[Notification::TYPE_POLL], ]; $this->server_key = $vapid;